How does one check whether a task is running in celery (specifically, I\'m using celery-django)?
I\'ve read the documentation, and I\'ve googled, but I can\'t see a
I found helpful information in the
Celery Project Workers Guide inspecting-workers
For my case, I am checking to see if Celery is running.
inspect_workers = task.app.control.inspect()
if inspect_workers.registered() is None:
state = 'FAILURE'
else:
state = str(task.state)
You can play with inspect to get your needs.