Quantcast
Channel: Cancel an already executing task with Celery? - Stack Overflow
Viewing all articles
Browse latest Browse all 10

Cancel an already executing task with Celery?

$
0
0

I have been reading the doc and searching but cannot seem to find a straight answer:

Can you cancel an already executing task? (as in the task has started, takes a while, and half way through it needs to be cancelled)

I found this from the doc at Celery FAQ

>>> result = add.apply_async(args=[2, 2], countdown=120)>>> result.revoke()

But I am unclear if this will cancel queued tasks or if it will kill a running process on a worker. Thanks for any light you can shed!


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images