我正在将 Bitnami AMI 用于 django 项目,该项目也需要运行 celery 和 celerycam。我想使用主管来启动和管理这些服务,但是遇到了麻烦。两者的配置类似,所以我只粘贴了 celeryd (/etc/supervisor/conf.d/celeryd.conf):
[program:celeryd]
command = python /home/bitnami/apps/django/django_projects/iris_django/manage.py celeryd -B -E
directory = /home/bitnami/apps/django/django_projects/iris_django
user = root
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/celeryd.log
stderr_logfile = /var/log/supervisor/celeryd_err.log
当我尝试启动它时,我得到了这个:
celeryd FATAL Exited too quickly (process log may have details)
日志表明“manage.py”文件的路径不正确。但是,我没有使用虚拟机(我不认为),并且我的所有模块(django、celery 等)都安装在基础 Python 安装上。有任何想法吗?
更新:这是日志信息(Django 肯定是通过 PIP 安装的):
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
Traceback (most recent call last):
File "/home/bitnami/apps/django/django_projects/iris_django/manage.py", line 8, in <module>