Retrieve task result by id in Celery
Question: I am trying to retreive the result of a task which has completed. **This
works**

    
    
    from proj.tasks import add
    res = add.delay(3,4)
    res.get()
    7
    res.status
    'SUCCESS'
    res.id
    '0d4b36e3-a503-45e4-9125-cfec0a7dca30'
    

But I want to run this from another application. So I rerun python shell and
try:

    
    
    from proj.tasks import add
    res = add.AsyncResult('0d4b36e3-a503-45e4-9125-cfec0a7dca30')
    res.status
    'PENDING'
    res.get() # Error
    

How can I retrieve the result?


Answer: This is due to RabbitMQ [not actually storing the
results](http://celery.readthedocs.org/en/latest/userguide/tasks.html#rabbitmq-
result-backend). If you need the ability to get the results later on, use
redis or SQL as the result backend.

