推荐学习书目
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 · Feb 29, 2020 · 3145 views
    This topic created in 2272 days ago, the information mentioned may be changed or developed.

    需求是这样:

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

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

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

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

    请教下有经验的表哥们~

    2 replies    2020-02-29 19:27:12 +08:00
    cz5424
        1
    cz5424  
       Feb 29, 2020 via iPhone
    参考 flower
    Perterually
        2
    Perterually  
       Feb 29, 2020
    https://github.com/xuxueli/xxl-job 用这个啊 看看适合你的需求不
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5273 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 07:06 · PVG 15:06 · LAX 00:06 · JFK 03:06
    ♥ Do have faith in what you're doing.