推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
ns2250225
V2EX  ›  Python

请教大家: Django 集成了 Celery,怎样分布式部署 worker 啊 👻

  •  
  •   ns2250225 ·
    ns2250225 · Sep 20, 2018 · 3242 views
    This topic created in 2983 days ago, the information mentioned may be changed or developed.
    请教大家:Django 集成了 Celery,怎样分布式部署 worker 啊 👻
    4 replies  •  2018-09-20 17:25:50 +08:00
    NaVient
    NaVient
    Sep 20, 2018❤️1
    1
    配置同一个 broker 共享 broker 就可以了
    ns2250225
    ns2250225
    OP
    Sep 20, 2018
    2
    @NaVient,DjangoA 和 DjangoB,都配置成同一个 broker,周期性任务的话,他们可能会各自执行自己的任务,会产生重复的数据,而且好像没达到分配任务给不同 worker 的目的
    neoblackcap
    neoblackcap
    Sep 20, 2018
    3
    @NaVient 你到底是有多少个 celery beat 实例?
    NaVient
    NaVient
    Sep 20, 2018
    4
    @ns2250225 共用一个 broker 的情况下每个 woker 都是队列的消费者,多处部署仅有一处 worker 能够消费掉消息,不会产生重复的数据
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2135 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 02:02 · PVG 10:02 · LAX 18:02 · JFK 21:02
    ♥ Do have faith in what you're doing.