Ale*_*exW 6 python celery flower
是否可以在芹菜守护进程中添加花?
下面是我的芹菜配置文件,我尝试将花配置添加到CELERYD_OPTS变量但它失败了.
或者是否有另一个命令我可以添加到配置文件中以获得开花和芹菜运行?
# Names of nodes to start
# most people will only start one node:
CELERYD_NODES="worker1"
# but you can also start multiple and configure settings
# for each in CELERYD_OPTS
#CELERYD_NODES="worker1 worker2 worker3"
# alternatively, you can specify the number of nodes to start:
#CELERYD_NODES=10
# Absolute or relative path to the 'celery' command:
CELERY_BIN="/usr/local/bin/celery"
# App instance to use
# comment out this line if you don't use an app
CELERY_APP="itapp"
# or fully qualified:
#CELERY_APP="proj.tasks:app"
# Where to chdir at start.
CELERYD_CHDIR="/itapp/itapp/"
# Extra command-line arguments to the worker
CELERYD_OPTS="flower --ports 5555 --time-limit=300 --concurrency=8"
# Configure node-specific settings by appending node name to arguments:
#CELERYD_OPTS="--time-limit=300 -c 8 -c:worker2 4 -c:worker3 2 -Ofair:worker1"
# Set logging level to DEBUG
#CELERYD_LOG_LEVEL="DEBUG"
# %n will be replaced with the first part of the nodename.
CELERYD_LOG_FILE="/var/log/celery/%n%I.log"
CELERYD_PID_FILE="/var/run/celery/%n.pid"
# Workers should run as an unprivileged user.
# You need to create this user manually (or you can choose
# a user/group combination that already exists (e.g., nobody).
CELERYD_USER="celery"
CELERYD_GROUP="celery"
# If enabled pid and log directories will be created if missing,
# and owned by the userid/group configured.
CELERY_CREATE_DIRS=1
Run Code Online (Sandbox Code Playgroud)
我建议使用supervisord或其他进程控制系统运行它们,而不是操作系统初始化脚本和启动停止守护进程。
Worker 和 Flower 都应该作为守护进程并行运行,有很多关于如何使用 Supervisord 运行 celery Worker 的文档,运行 Flower 只是添加另一个程序部分,将 Worker 命令替换为相应的 Flower 启动命令,例如celery flower -A itapp --ports 5555 --time-limit=300 --concurrency=8.
| 归档时间: |
|
| 查看次数: |
659 次 |
| 最近记录: |