grimreaper进程杀手的python客户端。
GrimReapersPie的Python项目详细描述
简介
grimreaperspie是一个apache2许可的库,用python编写,到(un)register 使用GrimReaper的长时间运行的进程。 运行时间超过注册期间给定时间的进程将被终止 由GrimReaper守护进程执行。
先决条件
安装并运行GrimReaper。
安装
要安装此库,只需:
$ pip install -U GrimReapersPie
用法
>>>fromgrimreaperimportGrimReaper>>>grim_reaper=GrimReaper(process_timeout=5)# set the global (default is 30s) timeout for 5 seconds>>>grim_reaper.register(timeout=10)# or override the global timeout here# long-running job>>>grim_reaper.unregister()# please, don't kill me, I had done my job before time has passed.
贡献
请参见contribution.rst
发布历史记录
0.1.0a2(2015-09-14)
- 修复了pypi包
0.1.0a1(2015-09-12)
- 出生在Python2.7和Python3.4下进行了简短的测试