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

给 Python -RQ(Redis Queue)加上 gevent 支持

  •  
  •   gansteed ·
    jiajunhuang · 2019-04-22 12:22:40 +08:00 · 1197 次点击
    这是一个创建于 1821 天前的主题,其中的信息可能已经有所发展或是发生改变。

    之前用 celery 的时候发现 celery 总是假死,后来切换到了 rq,发现非常好用。但是有一个问题,就是 rq 默认采用的是 fork 的模型,所以并发一上来,CPU 占用非常高,机器很可能就要挂掉。

    所以我们要给 rq 加上 gevent 支持,代码其实很简单,详见:

    https://jiajunhuang.com/articles/2019_04_18-python_rq_gevent.md.html

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1519 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:14 · PVG 01:14 · LAX 10:14 · JFK 13:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.