简体   繁体   English

搜索并有选择地从Celery中删除任务

[英]Search and selectively remove tasks from Celery

I want to clean up my celery queues. 我想清理芹菜队列。 How can I search the tasks by their types arguments and the selectively remove some of them? 如何通过任务的类型参数搜索任务并有选择地删除其中一些任务? I am using Redis as a broker if that matters; 如果重要的话,我正在使用Redis作为经纪人; I prefer to not deal with this at the Redis level though. 我宁愿不要在Redis级别上处理此问题。

The only option I see here is using coding directly using the Kombu library that is what Celery uses as AMQP a library that can dialogue with all the supported broker in an abstract way including Redis. 我在这里看到的唯一选择是直接使用Kombu库进行编码,这是Celery用作AMQP的库,该库可以以抽象的方式(包括Redis)与所有受支持的代理进行对话。 I will anyway discourage this practice as often the need of cleanup queue is an outcome of bad design. 无论如何,我都会劝阻这种做法,因为通常需要清理队列是不良设计的结果。

Regards 问候

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM