推荐学习书目
› 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
u2gign
V2EX  ›  Python

celery 中为啥程序失败了还是返回 task.state=success

  •  
  •   u2gign · Apr 29, 2020 · 3113 views
    This topic created in 2386 days ago, the information mentioned may be changed or developed.
    4 replies  •  2020-04-30 11:28:07 +08:00
    SingeeKing
    SingeeKing
    Apr 29, 2020
    1
    如果不想这样有 echo 机制,可以看看相关文档

    默认 success 是指的任务执行过了,到底是否执行成功了不考虑;如果设定为不成功再继续执行是有风险的(每次都执行失败浪费资源),一般要配合死信队列来一起设计逻辑
    est
    est
    Apr 29, 2020
    2
    state=success 表示快递员已经送达了。包裹内物品是否如实描述是你的事
    u2gign
    u2gign
    OP
    Apr 29, 2020
    3
    了解了 多谢各位
    deplives
    deplives
    Apr 30, 2020
    4
    celery 描述的 state 是指是否运行了,但是运行是否出错了他不管
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4851 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 02:31 · PVG 10:31 · LAX 18:31 · JFK 21:31
    ♥ Do have faith in what you're doing.