How to check task status in Celery?

前端 未结 13 974
北荒
北荒 2020-11-28 02:44

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

13条回答
  •  野性不改
    2020-11-28 03:36

    Try:

    task.AsyncResult(task.request.id).state

    this will provide the Celery Task status. If Celery Task is already is under FAILURE state it will throw an Exception:

    raised unexpected: KeyError('exc_type',)

提交回复
热议问题