Search code examples
celerycelery-task

Revoke multiple celery tasks


I want to revoke multiple tasks from celery. From official docs, they suggested below approach. Is there any limit for this? Because i will get around 10k or 100k tasks to revoked.

>>> app.control.revoke([
...    '7993b0aa-1f0b-4780-9af0-c47c0858b3f2',
...    'f565793e-b041-4b2b-9ca4-dca22762a55d',
...    'd9d35e03-2997-42d0-a13e-64a66b88a618',
])

Solution

  • There is not a limit. But please note the limitations around task revocation. In particular, this list of task IDs will be kept in memory or on disk, so there may be some amount of memory or disk overhead.