How to use Supervisor + Django + Celery with multiple Queues and Workers?

时光怂恿深爱的人放手 提交于 2019-12-03 10:30:34

问题


I'm using Celery + Django + Supervisord and I'm trying to setup a "priority" by creating 3 different queues (as suggested at https://stackoverflow.com/a/15827160/54872).

Is there a way to start celery beat and workers for each queue in one command for supervisor? Or, do I need to make different supervisor conf files for each queue/worker pool and one for celery beat?


回答1:


You can create program sections for each queue and combine them in a group section:

[program:worker1]
command=celery worker --queues=queue1

[program:worker2]
command=celery worker --queues=queue2

[group:workers]
programs=worker1,worker2


来源:https://stackoverflow.com/questions/18001788/how-to-use-supervisor-django-celery-with-multiple-queues-and-workers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!