Reputation: 3
I am using celery with django. I have multiple producers which are pushing in one queue, there are multiple workers. Celery default execution order of a queue is FIFO. Sometimes it so happens that one of the producer produces lots of tasks, this makes other producers starve for execution till all the tasks of that producer are finished. Is there any way to have some kind of fairness in executing tasks for all producers?
Upvotes: 0
Views: 513
Reputation: 32279
I have multiple producers which are pushing in one queue, […] Is there any way to have some kind of fairness in executing tasks for all producers?
The fairest solution would seem to be that you instead use a separate queue for each producer.
Upvotes: 1