views:

244

answers:

1

How can I delete a regular Task or PeriodicTask in celery?

+4  A: 

You revoke the task: See http://celeryproject.org/docs/reference/celery.task.control.html:

     elery.task.control.revoke(task_id, destination=None, 
                               connection=None, connect_timeout=4)
       Revoke a task by id.

       If a task is revoked, the workers will ignore the task and 
       not execute it after all.

       Parameters:  
          task_id         – Id of the task to revoke.
          destination     – If set, a list of the hosts to send the command to, 
                            when empty broadcast to all workers.
          connection      – Custom broker connection to use, if not set, a 
                            connection will be established automatically.
          connect_timeout – Timeout for new connection if a custom connection 
                            is not provided.
rlotun