推荐学习书目
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 · 2706 views
    This topic created in 2215 days ago, the information mentioned may be changed or developed.
    4 replies    2020-04-30 11:28:07 +08:00
    SingeeKing
        1
    SingeeKing  
    PRO
       Apr 29, 2020
    如果不想这样有 echo 机制,可以看看相关文档

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