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
Answer of 2020:
#### tasks.py
@celery.task()
def mytask(arg1):
print(arg1)
#### blueprint.py
@bp.route("/args/arg1=")
def sleeper(arg1):
process = mytask.apply_async(args=(arg1,)) #mytask.delay(arg1)
state = process.state
return f"Thanks for your patience, your job {process.task_id} \
is being processed. Status {state}"