Temporary queue made in Celery

前端 未结 5 954
既然无缘
既然无缘 2020-12-14 08:53

I am using Celery with RabbitMQ. Lately, I have noticed that a large number of temporary queues are getting made.

So, I experimented and found that when a task fails

5条回答
  •  天命终不由人
    2020-12-14 09:18

    amqp backend creates a new queue for each task. If you want to avoid it, you can use rpc backend which keeps results in a single queue.

    In your config, set

    CELERY_RESULT_BACKEND = 'rpc'
    CELERY_RESULT_PERSISTENT = True
    

    You can read more about this on celery docs.

提交回复
热议问题