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

Celery 如何定期删除结果数据?

  •  
  •   strahe · Mar 30, 2016 · 3403 views
    This topic created in 3831 days ago, the information mentioned may be changed or developed.

    我本人以前没有用到过 Celery,所以没什么经验,来请教下大家.

    业务场景中需要用到多个队列和异步任务,任务的执行结果后端打算用 redis 存储,便于快速的检查任务是否执行成功,但是问题是这种数据不会长时间有用,也许检查一下已经执行成功就不会再看了,这么样定时删除或者其他删除方式(或者 celery 本身就支持这种配置?),保证"执行结果"这种数据不会占用太多的空间并且尽可能的保证有用.

    ps:不知道放到 Python 节点对不对,找了很久也不知道放哪里合适.

    2 replies  •  2016-03-30 13:08:18 +08:00
    timonwong
        1
    timonwong  
       Mar 30, 2016
    Celery 自己有个任务的,设置好 CELERY_TASK_RESULT_EXPIRES ,保证 celery beat 运行就可以了
    strahe
        2
    strahe  
    OP
       Mar 30, 2016
    @timonwong ok 要得就是这个,谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   873 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 22:37 · PVG 06:37 · LAX 15:37 · JFK 18:37
    ♥ Do have faith in what you're doing.