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