Celery任务状态只有'PENDING'和'SUCCESS'。为什么任务状态没有"STARTED"?

Celery task status is only 'PENDING' and 'SUCCESS'.Why is there no "STARTED" in the task status?

我正在做一个演示,代码很简单:

# tasks.py
import time

from celery import Celery

app = Celery('tasks',
             broker='redis://:5tgb^YHN7ujm*IK<@localhost:6379/0',
             backend='redis://:5tgb^YHN7ujm*IK<@localhost:6379/0'
             )


@app.task
def test_task(s):
    time.sleep(300)
    return s

然后启动worker

 celery -A celery_test.app  worker -n kalidog -c 2 -l debug -E

 -------------- celery@kalidog v4.3.0 (rhubarb)
---- **** ----- 
--- * ***  * -- Linux-4.9.0-8-amd64-x86_64-with-debian-9.8 2019-10-11 02:36:12
-- * - **** --- 
- ** ---------- [config]
- ** ---------- .> app:         tasks:0x7f17bf92e128
- ** ---------- .> transport:   redis://:**@localhost:6379/0
- ** ---------- .> results:     redis://:**@localhost:6379/0
- *** --- * --- .> concurrency: 2 (prefork)
-- ******* ---- .> task events: ON
--- ***** ----- 
 -------------- [queues]
                .> celery           exchange=celery(direct) key=celery          

然后安排任务:

>>>from celery_test import test_task
>>>result = test_task.apply_async((11,)) 
>>>result.status
'PENDING'
>>>result.state
'PENDING'
>>>result.state
'PENDING'
>>>result.state
'SUCCESS'

为什么任务状态里没有"STARTED"?我检查了redis.There是redis中当前任务没有'celery-task-meta-XXX'之类的key,直到任务已完成

默认情况下不启用该功能。更多相关信息:https://docs.celeryproject.org/en/latest/userguide/tasks.html#started