【问题标题】:Can't force django-celery to respect settings from settings.py不能强制 django-celery 尊重 settings.py 中的设置
【发布时间】:2012-11-19 12:31:15
【问题描述】:

这是我的 settings.py 的摘录:

BROKER_URL = "amqp://guest@localhost:6000//"

之后

python manage.py celeryd

Celery 启动正常,显示:

 -------------- celery@karol-toshiba v3.0.12 (Chiastic Slide)
---- **** ----- 
--- * ***  * -- [Configuration]
-- * - **** --- . broker:      amqp://guest@localhost:5672//
- ** ---------- . app:         default:0xb6d01acc (.default.Loader)
- ** ---------- . concurrency: 2 (processes)
- ** ---------- . events:      OFF (enable -E to monitor this worker)
- ** ---------- 
- *** --- * --- [Queues]
-- ******* ---- . celery:      exchange:celery(direct) binding:celery
--- ***** ----- 

如何强制它使用指定的“BROKER_URL”设置?最终我希望它使用 'django://' 后端 url。任何帮助表示赞赏。

【问题讨论】:

    标签: python django settings celery django-celery


    【解决方案1】:

    确保您没有使用设置 BROKER_TRANSPORT、BROKER_PORT 或 BROKER_BACKEND。 BROKER_URL 就足够了。

    【讨论】:

      猜你喜欢
      • 2021-07-21
      • 2021-12-16
      • 2021-10-04
      • 2019-06-08
      • 2022-01-20
      • 1970-01-01
      • 2011-03-20
      • 2018-08-02
      • 1970-01-01
      相关资源
      最近更新 更多