Why does celery add thousands of queues to rabbitmq that seem to persist long after the tasks completel?

前端 未结 2 1069
萌比男神i
萌比男神i 2020-12-28 17:29

I am using celery with a rabbitmq backend. It is producing thousands of queues with 0 or 1 items in them in rabbitmq like this:

$ sudo rabbitmqctl list_queue         


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-28 17:48

    Use CELERY_TASK_RESULT_EXPIRES (or on 4.1 CELERY_RESULT_EXPIRES) to have a periodic cleanup task remove old data from rabbitmq.

    http://docs.celeryproject.org/en/master/userguide/configuration.html#std:setting-result_expires

提交回复
热议问题