Reputation: 400
I currently have a celery beat task that will periodically compute some result. Externally, I may have API calls (at an unknown frequency) that will query for this result. I was thinking of using the "last run task" result, so when the API would make the query, celery could simply query for the last returned result for the beat task.
I, however, do not see any documentation for this behavior. I have occasionally seen posts linking to the celery "task result store", but unfortunately all the links have given me a 404 Error.
Upvotes: 2
Views: 1260
Reputation: 607
I think it's not possible.
Even worker inspect doesn't give the list of finished task and neither their corresponding ids. maybe the best way is to write data directly to redis and read it later.
Another approach that may works is to share task id
which is accessible in the task (more) and get the result using Retrieve task result by id in Celery.
Upvotes: 1