V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
ray1888
V2EX  ›  Python

python3 async 与 Tornado , aioredis, celery 结合使用问题

  •  
  •   ray1888 ·
    ray1888 · Jul 4, 2018 · 4170 views
    This topic created in 2856 days ago, the information mentioned may be changed or developed.

    需求是这样,启动的时候 celery 订阅一个 channel 用于接收信号 ,需要在 tornado 的触发某个路由之后,然后使用 aioredis 进行订发布,修改每个 celery 里面的进程的某个变量。 问题:

    1. 在 python3 下面,aioredis 与 Tornado 的结合使用会有一定的问题,Tornado 出现假死,不接收请求,如何解决?
    2. celery 有办法能运行 aioredis 来进行订阅吗?因为我想是如果没有收到 Redis 的特定 channel 发布时,他会照这正常的 celery 一样,接收对应的请求
    4 replies    2018-07-05 09:37:17 +08:00
    owenliang
        1
    owenliang  
       Jul 4, 2018 via Android
    py 做复杂异步程序是束手束脚了。
    so1n
        2
    so1n  
       Jul 4, 2018
    请问你是 aioredis 的 pool 假死吗?
    ray1888
        3
    ray1888  
    OP
       Jul 4, 2018
    @so1n 不是 pool 假死,是加载完路由之后,再请求就假死了
    ackfin01
        4
    ackfin01  
       Jul 5, 2018
    我这边用 tornado+peewee_async(aiopg) 也出现过假死 不知道什么原因
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5309 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 07:10 · PVG 15:10 · LAX 00:10 · JFK 03:10
    ♥ Do have faith in what you're doing.