Assign different tasks to different celery workers

亡梦爱人 提交于 2019-12-03 03:43:32

I found the answer and I am putting it here in case someone else wanted to do the same:

Instead of using celery worker -Q q1,q2 -c 2, celery multi could be used:

celery multi start 2 -Q:1 q1 -Q:2 q2 -c:1 1 -c:2 1

Which says that we have 2 queues: -Q:1 q1 means queue #1 with name of q1 and same for q2 and we have different concurrencies for each queue, -c:1 1 means the first celery worker has a concurrency of 1.

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