【发布时间】:2014-08-25 20:29:47
【问题描述】:
这对我不起作用
$> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=精确
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"django 1.7rc3
芹菜 3.1.13
蟒蛇2.7
我尝试运行
celery worker -A <project_name>
我明白了
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
runserver 命令运行良好,所以我认为它与我的设置无关?
python manage.py runserver 0.0.0.0:8080
我已经仔细检查了 celery.py 并确认它具有以下行的正确值:
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proj.settings')
app = Celery('proj')
# Using a string here means the worker will not have to
# pickle the object when using Windows.
app.config_from_object('django.conf:settings')
还有什么我应该做的吗?
【问题讨论】: