Celery: auto discovery does not find tasks module in app

前端 未结 7 2165
说谎
说谎 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:12

    In my case, I couldn't figure out the problem until I tried to import the tasks in shell (python or python manage.py shell).

    >>> from project_name.tasks import task_add
    

提交回复
热议问题