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
Raul7
V2EX  ›  Python

请教下 Celery 多节点部署,怎么实时/定期监控节点的存活状态?

  •  
  •   Raul7 · 2020-02-29 15:39:44 +08:00 · 2188 次点击
    这是一个创建于 1516 天前的主题,其中的信息可能已经有所发展或是发生改变。

    需求是这样:

    任务部署了多个节点(内网、生产网和外网),页面上有个节点管理的功能,需要实时或定期监控这个节点是否存活。

    想过的方案:写一个 web api,每个节点定期请求,web 收到请求,证明节点存活。但是这样做涉及到 celery 任务下发,比如我当前节点已经有了任务在跑,那我请求 web api 的这个任务得等当前任务结束后,才会进行。

    感觉想的复杂了,有没有其他简单点的方法。

    celery 主节点本来就有监控其他节点的状态,是否可以通过这个入手?

    请教下有经验的表哥们~

    2 条回复    2020-02-29 19:27:12 +08:00
    cz5424
        1
    cz5424  
       2020-02-29 16:12:43 +08:00 via iPhone
    参考 flower
    Perterually
        2
    Perterually  
       2020-02-29 19:27:12 +08:00
    https://github.com/xuxueli/xxl-job 用这个啊 看看适合你的需求不
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2871 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 00:24 · PVG 08:24 · LAX 17:24 · JFK 20:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.