Search code examples
pythonpython-3.xcelerycelery-task

Is it possible to assign a tag to celery tasks, so it would be possible to kill whole group off tasks at once?


I want to categorize submitted tasks by custom tags, so that I would be able to kill all the tasks from one category. Is it possible to do that?


Solution

  • You can aggregate tasks with routing keys and queues. If you do that, you can purge an entire queue to kill all the tasks in that queue that are associated. The only caveat is that your production configuration will have to be modified so that new queues are created automatically.