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

celery 时间段内秒级任务执行

  •  
  •   kingofvir · May 10, 2019 · 4478 views
    This topic created in 2599 days ago, the information mentioned may be changed or developed.

    cdlery 如设在工作日朝九晚五时间段内,每 30 秒执行一次任务?

    11 replies    2019-05-14 16:58:52 +08:00
    est
        1
    est  
       May 10, 2019
    都 30 秒了。自己写个 sleep 吧。不要 celery 了。
    kingofvir
        2
    kingofvir  
    OP
       May 10, 2019
    @est 间隔太短了么?
    Philippa
        3
    Philippa  
       May 10, 2019 via iPhone
    简单的固定时间固定任务话内部用 rpc 就好了,触发然后执行,写个异步线程就行了。while true 非常可靠,没必要 Celery 高射炮打蚊子。一般我都是遇到大的项目才用 Celery 配合 Airflow.
    Gakho
        4
    Gakho  
       May 10, 2019
    可以了解一下 apscheduler
    xiongbiao
        5
    xiongbiao  
       May 10, 2019
    可以看看 celery beat
    tikazyq
        6
    tikazyq  
       May 10, 2019
    apscheduler
    RickyHao
        7
    RickyHao  
       May 10, 2019 via Android
    celery beat,schedule
    harpy
        8
    harpy  
       May 11, 2019
    记得 celery 自带 cron 的组建吧。。
    snip
        9
    snip  
       May 11, 2019
    sleep 30
    kimiichan
        10
    kimiichan  
       May 11, 2019
    celery beat add_periodic_task 或 linux crontab
    kingofvir
        11
    kingofvir  
    OP
       May 14, 2019
    @harpy cron 的组件最小单位似乎是分
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   981 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 23:15 · PVG 07:15 · LAX 16:15 · JFK 19:15
    ♥ Do have faith in what you're doing.