【发布时间】:2016-03-10 11:51:29
【问题描述】:
我尝试为 celery 创建守护进程。
这是我的芹菜
# Name of nodes to start, here we have a single node
CELERYD_NODES="w1"
# or we could have three nodes:
#CELERYD_NODES="w1 w2 w3"
# Where to chdir at start.
CELERYD_CHDIR="/home/ubuntu/workspace/ward/www“
ENV_PYTHON=“/usr/bin/python3”
# How to call "manage.py celeryd_multi"
CELERYD_MULTI="python3 $CELERYD_CHDIR/manage.py celeryd_multi"
# How to call "manage.py celeryctl"
CELERYCTL="python3 $CELERYD_CHDIR/manage.py celeryctl"
# Extra arguments to celeryd
CELERYD_OPTS="--time-limit=300 --concurrency=2 --beat --events --loglevel=info"
# Name of the celery config module.
CELERY_CONFIG_MODULE="celeryconfig"
# %n will be replaced with the nodename.
CELERYD_LOG_FILE="/var/logs/celery/%n.log"
CELERYD_PID_FILE="/var/run/celery/%n.pid"
# Workers should run as an unprivileged user.
CELERYD_USER=“ubuntu”
CELERYD_GROUP=“ubuntu”
# Name of the projects settings module.
export DJANGO_SETTINGS_MODULE=“fb_archive.settings"
它没有任何错误。 但是我的 django 项目不能使用 celery。
如果我运行这段代码,celery --app=fb_archive.celery:app worker -B --loglevel=INFO,django 项目可以使用 celery。
【问题讨论】:
-
它(webserver/django/celery)在日志中写了什么?
-
@1844144,它没有任何日志。它是空白的。