# Advanced example starting 10 workers in the background:
# * Three of the workers processes the images and video queue
# * Two of the workers processes the data queue with loglevel DEBUG
# * the rest processes the default' queue.
$ celery multi start 10 -l INFO -Q:1-3 images,video -Q:4,5 data -Q default -L:4,5 DEBUG
可以用作:
$ CELERYD_OPTS="--time-limit=300 --concurrency=8 -l INFO -Q:1-3 images,video -Q:4,5 data -Q default -L:4,5 DEBUG"
除非必要,否则不要创建额外的守护进程 .
希望这可以帮助 .
-1
您可以使用名为 CELERYD_OPTS 的指令添加可选的命令行参数 .
# Names of nodes to start
# most will only start one node:
CELERYD_NODES="w1 w2 w3"
# Extra command-line arguments to the worker
CELERYD_OPTS="--time-limit=300 --concurrency=4 -Q import"
3 回答
通过在CELERYD_OPTS中提供适当的args,可以使不同的工作者从不同/相同的队列中消耗 .
请参阅:http://celery.readthedocs.org/en/latest/reference/celery.bin.multi.html
该链接用于芹菜多文档,但您也可以以相同的方式为您的案例提供参数 .
可以用作:
除非必要,否则不要创建额外的守护进程 .
希望这可以帮助 .
您可以使用名为
CELERYD_OPTS
的指令添加可选的命令行参数 .但据我所知,此选项将告诉所有工作人员仅使用导入队列 .
如果您找不到可接受的答案,您可以尝试单独管理员工 .
值得注意的是,例如,您可以将节点名称与CELERYD_OPTS参数一起使用