我正在尝试清除rabbitmq / celery 队列中的任务列表。
我使用了以下内容:
root@ip-10-150-115-164:/my-api# celery amqp queue.purge celery
-> connecting to amqp://guest:**@localhost:5672//.
-> connected.
ok. 0 messages deleted.
为什么队列里有超过 12,000 条消息,却删除了 0 条消息?
sudo rabbitmqctl list_queues
Listing queues
celeryev.fdc87318-5013-465c-92be-e3081ed3c579 0
[email protected] 0
celeryev.218186c8-49d3-4601-8237-3edcb17ca82a 0
celery 12485
[email protected] 0
[email protected] 0
[email protected] 0
[email protected] 0
celeryev.616cf756-77fb-48fc-aa3c-a9a53e909ba1 0
celeryev.29bf149e-592c-4f82-990a-1a72c2830bb2 0
celeryev.c35d971e-80b1-492f-a111-6be576f6c825 0
谢谢
这个命令对我有用(对于 celery 5.2.6)
celery -A <APP_NAME> purge