[Answered ]-How to get celery task state?

2👍

I got the status of task as below

task.py

from celery.result import AsyncResult

result = task_name.AsyncResult(task_name.request.id)
taskStatus = result.state

celeryconfig.py

CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_IGNORE_RESULT = False
CELERY_TRACK_STARTED = True

Leave a comment