Skip to content

Commit 60a9900

Browse files
authored
Merge pull request #5 from btfak/develop
feat: add travic-ci
2 parents 59dbe37 + 1fb603f commit 60a9900

File tree

2 files changed

+48
-4
lines changed

2 files changed

+48
-4
lines changed

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: go
2+
go:
3+
- 1.7.x
4+
- 1.8.x
5+
- 1.9.x
6+
env:
7+
- GOARCH=amd64
8+
- GOARCH=386
9+
sudo: false
10+
script:
11+
- go build
12+
- go test ./...
13+
notifications:
14+
email: false

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## later
1+
## later ![](https://travis-ci.org/btfak/later.svg?branch=master)
22
later is a redis base delay queue
33

44

@@ -26,14 +26,15 @@ Usage of ./later:
2626
- performance
2727

2828

29-
3029
### Frontend API
3130

31+
Response http code: **200** success, **400** request invalid, **404** task not found, **500** internal error
32+
3233
- Create Task
3334

3435
```
3536
Request:
36-
POST /
37+
POST /create
3738
{
3839
"topic":"order",
3940
"delay":15, // second
@@ -47,7 +48,36 @@ Usage of ./later:
4748
}
4849
```
4950

50-
51+
- Delete Task
52+
53+
```
54+
Request:
55+
POST /delete
56+
{
57+
"id":"35adbde5-77c4-4d65-adac-0082d91f2554"
58+
}
59+
```
60+
61+
- Query Task
62+
63+
```
64+
Request:
65+
POST /query
66+
{
67+
"id":"35adbde5-77c4-4d65-adac-0082d91f2554"
68+
}
69+
Response:
70+
{
71+
"id": "cb9aefdd-5bd1-4bf3-8c94-1ed5c2ea638e",
72+
"topic": "order",
73+
"execute_time": 1504934230,
74+
"max_retry": 1,
75+
"has_retry": 0,
76+
"callback": "http://127.0.0.1:8888/success",
77+
"content": "hello",
78+
"creat_time": 1504934220
79+
}
80+
```
5181

5282
### Backend API
5383

0 commit comments

Comments
 (0)