from worker's guide :
When a worker receives a revoke request it will skip executing the task, but it won’t terminate an already executing task unless the terminate option is set.
If terminate is set the worker child process processing the task will be terminated
using app.control.revoke(task_id,terninate=True),this will kill the worker's subprocess and all the other tasks will be fine.
here i am starting two tasks and terminate one of them:
app.control.revoke("c028bd99-8394-4e2c-86ab-440ca2290d67",terninate=True) [2015-11-19 04:55:09,458: INFO/MainProcess] Received task: celery.starmap[73c53773-2dd5-40d0-b9a0-83b2f12eba9b] [2015-11-19 04:55:09,465: INFO/MainProcess] Received task: celery.starmap[c028bd99-8394-4e2c-86ab-440ca2290d67] [2015-11-19 04:57:13,993: INFO/MainProcess] Tasks flagged as revoked: c028bd99-8394-4e2c-86ab-440ca2290d67 [2015-11-19 04:59:32,684: INFO/MainProcess] Terminating c028bd99-8394-4e2c-86ab-440ca2290d67 (15) [2015-11-19 04:59:32,781: ERROR/MainProcess] Task celery.starmap[c028bd99-8394-4e2c-86ab-440ca2290d67] raised unexpected: Terminated(15,) Traceback (most recent call last): File "....../lib/python2.7/site-packages/billiard/pool.py", line 1678, in _set_terminated raise Terminated(-(signum or 0)) Terminated: 15