2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-12-26 07:42:17 +08:00
Commit Graph

347 Commits

Author SHA1 Message Date
Ken Hibino
12fc336889
Merge pull request #16 from hibiken/feature/signals
Add timeout to shutdown when TERM signal is received
2019-12-16 06:54:06 -08:00
Ken Hibino
bcaccf1174 [ci skip] Update todos 2019-12-16 06:41:15 -08:00
Ken Hibino
eb3216d354 Fix: Use buffered channel of size 1 to avoid goroutine leaks 2019-12-16 06:40:52 -08:00
Ken Hibino
989b2b6d55 Add timeout to worker goroutines when TERM signal is received
Wait for a certain amount of time to allow for worker goroutines to
finish. If the goroutines don't finish with the timeout duration,
processor will quit the goroutines and restore any unfinished tasks from
the in_progress queue back to the default queue.
2019-12-15 21:00:09 -08:00
Ken Hibino
e5686894d3 Fix: Do not use lua cjson library to encode task to json
Go and Lua json libraries encodes json differently (e.g. order of
key/value) and caused a bug when removing tasks that was previously
encoded by Lua json library and redis was receiving a string generated
by Go json library.
2019-12-15 20:05:56 -08:00
Ken Hibino
442b33a6d2 Remove (*RDB).RetryLater in favor of Retry method 2019-12-15 17:18:43 -08:00
Ken Hibino
d84e8c0ff2 Modify (*RDB).Kill method to atomically move task from in_progress to
dead queue
2019-12-15 17:16:13 -08:00
Ken Hibino
1b1662bb12 Add Retry method to *RDB
(*RDB).Retry method takes a TaskMessage and will atomically moves the
message from in_progress queue to retry queue. Additionally it
increments the Retried counter and assigns the error message to the
message.
2019-12-15 16:15:07 -08:00
Ken Hibino
1857d12cea
Merge pull request #15 from hibiken/refactor/testing
Refactor tests
2019-12-14 13:58:33 -08:00
Ken Hibino
04836194f9 Clean up rdb package tests 2019-12-14 13:43:06 -08:00
Ken Hibino
9410a65338 Rename randomTask test helper to newTaskMessage 2019-12-12 19:45:03 -08:00
Ken Hibino
d2eeaf6ab1 [ci skip] Update todos 2019-12-12 19:05:25 -08:00
Ken Hibino
0620f2f0f7
Merge pull request #14 from hibiken/feature/delall
Add delall command to asynqmon CLI
2019-12-12 19:03:17 -08:00
Ken Hibino
b7870548d3 Add delall command to asynqmon CLI 2019-12-12 07:02:14 -08:00
Ken Hibino
ca31cbf843 Add DeleteAll* methods to rdb 2019-12-12 06:43:42 -08:00
Ken Hibino
9d79861ac0
Merge pull request #13 from hibiken/feature/del
Add del command to asynqmon CLI
2019-12-11 21:14:02 -08:00
Ken Hibino
1a687bbf84 Add del command to asynqmon CLI 2019-12-11 21:03:47 -08:00
Ken Hibino
be746d01a5 Add delete methods to rdb 2019-12-11 20:15:30 -08:00
Ken Hibino
193d27d93d
Merge pull request #12 from hibiken/feature/shorter_id
Use rs/xid package for more compact string representation of task IDs
2019-12-11 07:49:59 -08:00
Ken Hibino
edcd70b221 Replace google/uuid package with rs/xid for more compact id 2019-12-11 07:41:38 -08:00
Ken Hibino
8b6e3172ce [ci skip] Update todos 2019-12-11 07:13:04 -08:00
Ken Hibino
542b7867d8
Merge pull request #11 from hibiken/feature/enqall
Add enqall command to asynqmon CLI
2019-12-10 22:01:54 -08:00
Ken Hibino
ef562e2efa Minor improvement 2019-12-10 21:48:19 -08:00
Ken Hibino
a96719413c Add enqall command to asynqmon CLI 2019-12-10 21:40:28 -08:00
Ken Hibino
0d74c518bf Add methods to rdb to enqueue all tasks from dead, retry and scheduled
queue
2019-12-10 20:28:31 -08:00
Ken Hibino
c0185061eb
Merge pull request #10 from hibiken/feature/enq
Add enq command to asynqmon CLI
2019-12-09 20:43:17 -08:00
Ken Hibino
ea28d3cac1 Minor improvement 2019-12-09 20:37:30 -08:00
Ken Hibino
8830d23388 Rename rdb methods to enqueue scheduled, retry, and dead tasks 2019-12-09 19:33:07 -08:00
Ken Hibino
b766de4f18 [ci skip] Update documentations for enq command 2019-12-09 06:58:34 -08:00
Ken Hibino
764edc35e3 [ci skip] Update todos 2019-12-09 06:52:43 -08:00
Ken Hibino
8932ca41b3 Minor improvement 2019-12-09 06:30:45 -08:00
Ken Hibino
4179c72c05 Add enq command to asynqmon 2019-12-09 06:18:25 -08:00
Ken Hibino
39c4904dae
Merge pull request #9 from hibiken/feature/rescue
Add methods to RDB to enqueue a task sitting in ZSET (scheduled, retry, dead).
2019-12-08 14:18:37 -08:00
Ken Hibino
bbd8fb901f [ci skip] Fix typos 2019-12-08 14:17:57 -08:00
Ken Hibino
680a2cf3df Add methods to rdb.RDB to enqueues a task from scheduled, retry, dead
queues
2019-12-08 14:12:02 -08:00
Ken Hibino
8e2c4e5716 Update todos 2019-12-07 20:25:46 -08:00
Ken Hibino
b8e456742f
Merge pull request #8 from hibiken/feature/tools
Use cobra for asynqmon CLI
2019-12-07 20:03:26 -08:00
Ken Hibino
9941c9e303 Minor fixes 2019-12-07 19:59:12 -08:00
Ken Hibino
2951cc355f Remove cobra comments 2019-12-07 09:15:46 -08:00
Ken Hibino
0382fc1d08 Fix readme 2019-12-07 08:47:17 -08:00
Ken Hibino
ad01341c73 Add ls command to asynqmon 2019-12-07 08:45:26 -08:00
Ken Hibino
c1d0497182 Remove debug log 2019-12-06 22:30:11 -08:00
Ken Hibino
62fb3cf7d9 Add flags to stats command 2019-12-06 22:06:59 -08:00
Ken Hibino
b749d8bd34 Use cobra for tools 2019-12-06 22:06:59 -08:00
Ken Hibino
5c2cb917e1 Change cmd dir to tools 2019-12-06 22:06:59 -08:00
Ken Hibino
e658f04648
Merge pull request #7 from hibiken/feature/doc
Add package documentation
2019-12-06 22:04:21 -08:00
Ken Hibino
aa8a3b8aaa Update exported package API docs 2019-12-06 22:00:09 -08:00
Ken Hibino
46e84769b5 Add doc.go for package documentation 2019-12-06 21:24:36 -08:00
Ken Hibino
20ad6daa6e Update todos 2019-12-05 17:28:05 -08:00
Ken Hibino
3d72ca5a74
Merge pull request #6 from hibiken/refactor/internalpkg
Create internal package for reuse
2019-12-05 17:18:01 -08:00