5
在celery我想获取特定任务名称的所有任务的任务状态。为此尝试下面的代码。在芹菜如何获得任务状态为所有任务的具体任务名称?
import celery.events.state
# Celery status instance.
stat = celery.events.state.State()
# task_by_type will return list of tasks.
query = stat.tasks_by_type("my_task_name")
# Print tasks.
print query
现在我在这段代码中得到空列表。