Ali
Ali

Reputation: 303

Retrieving the result of a task in Celery

I have a long running task in my Django application, and would like to display a progress bar and then output the task result to the user when finished.

I've found easily how to start the task and produce a progress bar via messaging, but how do I retrieve the results from the task once it's finished and display these to the user?

Using Redis as my message broker.

Upvotes: 0

Views: 178

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599450

You need to set a results backend in Celery.

The separate django-celery-results library will configure Django models as a result backend, and you can fetch the results from there.

Upvotes: 1

Related Questions