Kala 是用 Go 写成的简单的、现代的、高性能的工作调度,它没哟任何依赖。
Kala 的灵感来自于 Chronos,Chronos 由 Airbnb 开发,它建立于 Mesos 的顶层,默认容错和分布式设计。这两个设计是 Kala 所没有的,因为 Kala 专为小型部署而开发。
示例代码:
ajvb$ curl http://127.0.0.1:8000/api/v1/job/ {"jobs":{}} ajvb$ curl http://127.0.0.1:8000/api/v1/job/ -d ' {"epsilon": "PT5S", "command": "bash /home/ajvb/gocode/src/github.com/ajvb/kala/examples/ example-kala-commands/example-command.sh", "name": "test_job", "schedule": "R2/2015-06-04T19:25:16.828696-07:00/PT10S"}' {"id":"93b65499-b211-49ce-57e0-19e735cc5abd"} ajvb$ curl http://127.0.0.1:8000/api/v1/job/ { "jobs":{ "93b65499-b211-49ce-57e0-19e735cc5abd":{ "name":"test_job", "id":"93b65499-b211-49ce-57e0-19e735cc5abd", "command":"bash /home/ajvb/gocode/src/github.com/ajvb/kala/examples/example-kala-commands/example-command.sh", "owner":"", "disabled":false, "dependent_jobs":null, "parent_jobs":null, "schedule":"R2/2015-06-04T19:25:16.828696-07:00/PT10S", "retries":0, "epsilon":"PT5S", "success_count":0, "last_success":"0001-01-01T00:00:00Z", "error_count":0, "last_error":"0001-01-01T00:00:00Z", "last_attempted_run":"0001-01-01T00:00:00Z", "next_run_at":"2015-06-04T19:25:16.828794572-07:00" } } }