首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >manage.py运行服务器停滞(无错误)

manage.py运行服务器停滞(无错误)
EN

Stack Overflow用户
提问于 2018-05-03 00:54:58
回答 1查看 277关注 0票数 0

当我添加到__init__.py行时,default_app_config = 'component.nodes.apps.NodesConfig'应用程序文件有以下代码:

代码语言:javascript
复制
from django.apps import AppConfig


class NodesConfig(AppConfig):
    name = 'component.nodes'

    def ready(self):
        from component.nodes import signals

Django manage.py runserver卡住了,如果我按下ctrl-c,没有发送任何错误,我收到了nex回溯:

代码语言:javascript
复制
^CTraceback (most recent call last):


File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/storj/storj/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/home/storj/storj/lib/python3.6/site-packages/django/core/management/__init__.py", line 318, in execute
    autoreload.check_errors(django.setup)()
  File "/home/storj/storj/lib/python3.6/site-packages/django/utils/autoreload.py", line 228, in wrapper
    fn(*args, **kwargs)
  File "/home/storj/storj/lib/python3.6/site-packages/django/__init__.py", line
27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/storj/storj/lib/python3.6/site-packages/django/apps/registry.py", line 116, in populate
    app_config.ready()
  File "/home/storj/storjboard_server/component/nodes/apps.py", line 8, in ready
    from component.nodes import signals
  File "/home/storj/storjboard_server/component/nodes/signals.py", line 5, in <module>
    from component.nodes.tasks import node_info_update
  File "/home/storj/storjboard_server/component/nodes/tasks.py", line 5, in <module>
    from server.celery import app
  File "/home/storj/storjboard_server/server/celery.py", line 10, in <module>
    django.setup()
  File "/home/storj/storj/lib/python3.6/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/storj/storj/lib/python3.6/site-packages/django/apps/registry.py", line 71, in populate
    with self._lock:
KeyboardInterrupt
EN

回答 1

Stack Overflow用户

发布于 2018-05-03 18:57:42

我发现了问题问题是在signals.py中我使用了celery异步任务,并且celery没有正确设置

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50139842

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档