【问题记录】获取celery任务状态报错 - AttributeError: ‘DisabledBackend‘ object has no attribute ‘_get_task_meta_for

问题记录

尝试获取任务状态时报错
AttributeError: 'DisabledBackend' object has no attribute '_get_task_meta_for'

解决方案

使用app.AsyncResult(),而不是AsyncResult(id)

app = Celery('mytasks', broker='redis://localhost:6379/0',backend='redis://localhost:6379/1',)
def t_status(id):
    c = app.AsyncResult(id)
    return c

你可能感兴趣的:(前端,javascript,开发语言)