V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
miniyao
V2EX  ›  Python

多个 Flask 实例,使用了同一个 celery 异步队列,会造成任务冲突吗?

  •  
  •   miniyao · 2020-12-22 07:49:01 +08:00 via Android · 1983 次点击
    这是一个创建于 1223 天前的主题,其中的信息可能已经有所发展或是发生改变。
    由于一台 flask 服务器性能不够,计划再增加 3 台 flask 应用服务器,原来服务器上使用了 celery 异步队列,在 celery_worker 中都有关联 flask 的 app 上下文:

    app.app_context().push()

    现在把 flask 服务器数量扩充,这会导致 flask 的 app 上下文也横向扩展了,会造成 celery_worker 中队列任务冲突 /重复吗?
    2 条回复    2020-12-22 09:23:58 +08:00
    ebingtel
        1
    ebingtel  
       2020-12-22 08:48:25 +08:00
    celery beat 是一个 应该没问题
    Latin
        2
    Latin  
       2020-12-22 09:23:58 +08:00
    celery once 了解一下
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4462 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 04:06 · PVG 12:06 · LAX 21:06 · JFK 00:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.