views:

38

answers:

1

Not talking about the delay method.

I want to be able to get a task, given it's task_id and change it's ETA on the fly, before it is executed.

For now I have to cancel it, and re-schedule one. Troublesome if the scheduled process involve a lot of stuff.

A: 

You should store some 'pause' value outside of celery/task queue. I do this with a mailer using celery. I can pause parts of the system by setting values in either memcache or mysql. The tasks then make sure to query the outside resource before executing the task. If it's meant to be paused it sets it does a task.retry() that causes it to go through the retry delay time and such.

Rick
The prupose it to remove the task from the queue. If it's just what you suggest, the contrib AbortableTask already does it.
e-satis