Celery: auto discovery does not find tasks module in app

前端 未结 7 2206
说谎
说谎 2021-02-19 19:50

I have the following setup with a fresh installed celery and django 1.4:

settings.py:

import djcelery
djcelery.setup_loader()

BROKER_HOST = \'localhost         


        
7条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-19 20:08

    I had the same issue with django 1.4.1 celery 3.0.9 and fixed it by naming the task.

    @task() -> @task(name='testapp.tasks.add')

提交回复
热议问题