项目作者: tkyshm

项目描述 :
delay job queue
高级语言: Erlang
项目地址: git://github.com/tkyshm/delay.git
创建时间: 2017-03-04T05:23:53Z
项目社区:https://github.com/tkyshm/delay

开源协议:Other

下载


Build Status

delay

Simple delay job Application

Build

  1. $ rebar3 compile

API

POST /api/enqueue

  • Content-Type: application/json
  • Post parameters
param description
exec_time exec_time is specified by unixtime (seconds). (optional)
webhook GET request to webhook when a job is finished. (optional)
data user job’s parameters. (optional)
  1. {
  2. "event": "event_name",
  3. "exec_time": 1488714710,
  4. "webhook": "hook_url",
  5. "data" : {
  6. "id": "xxx",
  7. "name": "kirito"
  8. }
  9. }

GET /api/dequeue

  • Support long-polling
  • Request headers:
header value
X-Delay-Timeout Long-polling timeout (seconds).
  • Response:
    1. [
    2. {
    3. "uid": "afcc27ac-3f03-4cdd-ad73-ddd9422b56d6",
    4. "data": {
    5. "name": "abc",
    6. "id": "12304"
    7. }
    8. },
    9. {
    10. "uid": "ad09e2c3-f14f-4c51-a8df-6b7a3b7ba3d6",
    11. "data": {
    12. "name": "defg",
    13. "id": "348593"
    14. }
    15. }
    16. ]

TODO:

  • enqueue
  • docker
  • mnesia
  • job worker
  • dequeue
  • long-polling
  • webhook
  • test code
  • ci
  • load test
  • document
  • cleans commit