From what I have seen, the task state depends entirely on the value set for CELERY_TASK_RESULT_EXPIRES - if I check the task state within this interval after the task has finished executing, the state returned by:
AsyncResult(task_id).state
is correct. If not, the state will not be updated and will remain forever PENDING.
Can anyone explain me why does this happen? Is this a feature or a bug? Why is the task state depending on the result expiry time, even if I am ignoring results?
(Celery version: 3.0.23, result backend: AMQP)