如何用非标准django项目设置芹菜?

时间:2015-11-02 13:24:30

标签: python django celery django-celery

我们的django项目结构是这样的:

project
  project
    apps (folder with django apps)
      consumer
      provider
        notifications
          tasks.py (celery tasks)
    locale
    static
    site (urls and settings files, we have different settings for, site, widget, api)
      api
      web
      widget
      provider (this one is going to use celery)
        settings
          dev.py
          settings.py
        urls 
          urls.py
        __init__.py
    manage.py

我尝试将celery.py放在site / provider文件夹中,但是我在运行celery worker时遇到了问题。我不确定从哪个文件夹运行worker。

Celery必须使用提供商设置并在apps文件夹中搜索任务。

0 个答案:

没有答案