Find out whether celery task exists

后端 未结 6 436
离开以前
离开以前 2020-12-13 12:55

Is it possible to find out whether a task with a certain task id exists? When I try to get the status, I will always get pending.

>>> AsyncResult(\'         


        
6条回答
  •  孤街浪徒
    2020-12-13 13:17

    Please correct me if i'm wrong.

    if built_in_status_check(task_id) == 'pending'
       if registry_exists(task_id) == true
          print 'Pending'
       else
          print 'Task does not exist'
    

提交回复
热议问题