相关疑难解决方法(0)

腌制芹菜

按照此处的说明,我将脚本从github复制到/etc/init.d/celeryd,然后使其可执行;

$ ll /etc/init.d/celeryd
-rwxr-xr-x 1 root root 9481 Feb 19 11:27 /etc/init.d/celeryd*
Run Code Online (Sandbox Code Playgroud)

我按照说明创建了配置文件/ etc/default/celeryd:

# Names of nodes to start
#   most will only start one node:
#CELERYD_NODES="worker1"
#   but you can also start multiple and configure settings
#   for each in CELERYD_OPTS (see `celery multi --help` for examples).
CELERYD_NODES="worker1 worker2 worker3"

# Absolute or relative path to the 'celery' command:
CELERY_BIN="/usr/local/bin/celery"
#CELERY_BIN="/virtualenvs/def/bin/celery"

# App instance to use
# comment out …
Run Code Online (Sandbox Code Playgroud)

python linux celery celeryd

13
推荐指数
1
解决办法
1万
查看次数

celeryd 和 celerybeat pid 文件未创建,工作人员未启动,但输出显示正常

我将 celeryd 和 celerybeat 设置为守护进程,它们工作了不久。但从一段时间以来,它不会启动工作程序,也不会创建 pid 文件。

这是我的/etc/default/celeryd

# Name of nodes to start
CELERYD_NODES="w1 w2 w3 w4 w5 w6 w7 w8"

# Extra arguments to celeryd
CELERYD_OPTS="--time-limit=300 --concurrency=8"

# Where to chdir at start.
CELERYD_CHDIR="/srv/www/web-system/myproject"

# %n will be replaced with the nodename.
#CELERYD_LOG_FILE="/var/log/celery/%n.log"
#CELERYD_PID_FILE="/var/run/celery/%n.pid"
CELERYD_LOG_FILE="/srv/www/web-system/logs/celery/%n.log"
CELERYD_PID_FILE="/srv/www/web-system/pids/celery/%n.pid"

# Log level to use for celeryd. Default is INFO.
CELERYD_LOG_LEVEL="INFO"

# How to call "manage.py celeryd_multi"
CELERYD_MULTI="$CELERYD_CHDIR/manage.py celeryd_multi"

# How to call "manage.py celeryctl"
CELERYCTL="$CELERYD_CHDIR/manage.py celeryctl"

# Workers should …
Run Code Online (Sandbox Code Playgroud)

django daemons django-celery

3
推荐指数
1
解决办法
7986
查看次数

标签 统计

celery ×1

celeryd ×1

daemons ×1

django ×1

django-celery ×1

linux ×1

python ×1