I store the task_id
from an celery.result.AsyncResult
in a database and relate it to the item that the task affects. This allows me to perform a query to retrieve all the task_id
s of tasks that relate to a specific item.
So after retrieving the task_id
from the database, how do I go about retrieving information about the task's state/result/etc?
From the Celery FAQ :
result = MyTask.AsyncResult(task_id)
result.get()
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.