What is the difference between having:
for the same queue.
Thanks
There is no point in running more than one worker on a particular machine unless you want to do routing. I would suggest running only 1 worker per machine with the default number of processes.
Concurrency settings The default is 4 (four messages for each process). The default setting seems pretty good here. However, if you have very long running tasks waiting in the queue and you have to start the workers, note that the first worker to start will receive four times the number of messages initially.
You probably just need to add the --concurrency or -c argument when starting the worker to spawn multiple (parallel) worker instances. Show activity on this post. You can look for Canvas primitives there you can see how to make groups for parallel execution. class celery.
Celery itself is using billiard (a multiprocessing fork) to run your tasks in separate processes.
I assume that you are running both workers in the same machine. In that case I would recommend you to maintain one worker for a queue.
I do realise I responded 2+ years later. But I just thought I'll put it here for anyone who still has similar doubts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With