I have a set o celery tasks that I run using:
my_task.apply_async(args, eta=some_eta)
But sometimes due to certain conditions I need to change the ETA of those tasks.
I can get the id of the task using inspect
and scheduled
methods and I'm wondering if there's a way to change the ETA parameter knowing the id of the task or I should revoke this task and start another one?
inspect
and scheduled
are about the worker's (workers') queue and the queue cannnot be changed.
You can only change eta value before running apply_async() or delay()
Maybe you can revoke the task and start a new one with different eta.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.