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

分享一个开源支持程序操作能轻松管理千万级别定时任务的定时服务吧

  •  
  •   sujin190 ·
    snower · Mar 2, 2018 · 4294 views
    This topic created in 3128 days ago, the information mentioned may be changed or developed.
    https://github.com/snower/forsun

    1、使用 linux 系统定时器提供精确到秒级的定时调度,长时间运行无误差
    2、支持本地内存存储和 redis 持久化存储,使用 redis 可轻松管理数千万定时任务
    3、支持 Apache Thrift 接口调用创建和删除更新定时任务信息
    4、支持 shell、http、reids、thrift、beanstalk、mysql 六种到时触发回调方式,并可以通过扩展轻松自定义回调器

    在实际项目中,存在大量需要定时或是延时触发的任务,比如电商中,延时需要检查订单是否支付成功,是否配送成功,定时给用户推送提醒等等,常规做法是用 crontab 每分钟扫码数据看是否到达时间,繁琐且扩展性伸缩性较差,使用 forsun 服务,可以简单的针对每一个订单创建一个定时任务,配合异步队列,可以轻松实现扩展性伸缩性,Apache Thrift 的编程接口也可以很容易的和 celery、laravel 配合。

    其他场景下,比如失败延时重试,使用 forsun 定时服务也可以很简单就可以实现。
    Supplement 1  ·  Mar 4, 2018
    详细一些的介绍看这: https://segmentfault.com/a/1190000013513072
    3 replies  •  2018-03-06 14:44:43 +08:00
    E1n
        1
    E1n  
       Mar 3, 2018 via Android
    mark,使用下看看
    slgz
        2
    slgz  
       Mar 3, 2018
    mark
    chrismins
        3
    chrismins  
       Mar 6, 2018
    mark 一下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2633 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 03:33 · PVG 11:33 · LAX 20:33 · JFK 23:33
    ♥ Do have faith in what you're doing.