2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-11-15 11:58:47 +08:00
Commit Graph

909 Commits

Author SHA1 Message Date
Ken Hibino
efaceb8a03 Clean up error messages from rdb methods 2019-11-27 19:43:33 -08:00
Ken Hibino
c9a8f5fabd Minor cleanup 2019-11-27 19:36:56 -08:00
Ken Hibino
0db4b8a34f fix:Remove task from in_progress when worker goroutine finishes
There was a bug related to the logic of removing task from
"asynq:in_progress" list when worker is finished. The task was not
properly removed from the list when the taskMessage gets modified before
the deferred call. More specifically when task was scheduled for retry
the message was modified and therefore LREM could not properly removed
the message from "asynq:in_progress" list.
2019-11-27 14:26:04 -08:00
Ken Hibino
871162cd67
Merge pull request #3 from hibiken/feature/recover
Protect handler call against panic
2019-11-27 14:05:39 -08:00
Ken Hibino
d4f136ebc9 Protect handler call against panic 2019-11-27 14:03:04 -08:00
Ken Hibino
47e2a57d05 Rename (*rdb).zadd to (*rdb).schedule 2019-11-27 07:16:16 -08:00
Ken Hibino
fab2dcb56e Change newRDB signature 2019-11-27 06:41:54 -08:00
Ken Hibino
e6b1230c36 Update log messages on shutdown 2019-11-27 06:33:04 -08:00
Ken Hibino
60132f3208 Minor cleanup 2019-11-27 06:21:57 -08:00
Ken Hibino
d35d345e2d
Merge pull request #2 from hibiken/feature/lua
Use Lua script to make multiple redis commands atomic
2019-11-26 10:19:26 -08:00
Ken Hibino
97b96f6992 Use lua script to implement (*rdb).moveAll 2019-11-26 10:09:42 -08:00
Ken Hibino
4fd82c5975 Refactor (*rdb).moveAll test 2019-11-26 09:57:53 -08:00
Ken Hibino
d2a6cc127d Use (*rdb).forward in poller 2019-11-26 06:52:58 -08:00
Ken Hibino
cff5e67018 Refactor (*rdb).forward test 2019-11-26 06:38:11 -08:00
Ken Hibino
810c40bd54 Refactor dequeue test 2019-11-25 20:57:53 -08:00
Ken Hibino
199dcf8fdb Use pipeline for enqueue 2019-11-25 20:10:35 -08:00
Ken Hibino
faa9b6ee22 Rename (*rdb).push to enqueue 2019-11-25 19:58:24 -08:00
Ken Hibino
737de898eb Refactor rdb_test.go 2019-11-25 19:09:15 -08:00
Ken Hibino
4aa5078dc4 Add (*rdb).forward method using lua script 2019-11-25 07:11:40 -08:00
Ken Hibino
f91004e6aa Add DB field to RedisOpt to specify redis db index 2019-11-24 18:41:55 -08:00
Ken Hibino
d5c2b9b995 Follow the convention of declaring variable immediately after its guard
mutex
2019-11-23 20:18:39 -08:00
Ken Hibino
5eaf606a0d fix: Nil out handler reference after all workers have finished 2019-11-23 17:09:57 -08:00
Ken Hibino
ac3190a0d5 Update comments 2019-11-23 16:44:22 -08:00
Ken Hibino
be3b774b51 Simplify Background API 2019-11-23 15:44:42 -08:00
Ken Hibino
e19c45cff3 Rename Launcher to Background 2019-11-23 15:22:43 -08:00
Ken Hibino
847d724985
Merge pull request #1 from hibiken/feature/simple_rescue
Rescue dead "In Progress" tasks
2019-11-23 15:15:46 -08:00
Ken Hibino
fd80126a67 Add logic to restore unfinished tasks back into the default queue if
there are any uncompleted tasks
2019-11-23 15:09:50 -08:00
Ken Hibino
4a327933bd Use command BRPUSHLPOP to move from queue to in_progress in redis 2019-11-23 08:43:41 -08:00
Ken Hibino
76ceb282a9 Change the direction of list push/pop operations 2019-11-23 08:24:16 -08:00
Ken Hibino
3fa867b190 Remove per task heartbeat 2019-11-23 08:21:32 -08:00
Ken Hibino
2e0af11ca0 Add heartbeat goroutine to write heartbeat data to redis for active
worker
2019-11-22 06:43:42 -08:00
Ken Hibino
80f477212d Add ID field to taskMessage 2019-11-22 06:16:43 -08:00
Ken Hibino
67a9e8aa00 Track in-progress tasks with redis SET 2019-11-21 21:45:27 -08:00
Ken Hibino
c84287d7ab Minor fixes 2019-11-21 20:22:55 -08:00
Ken Hibino
66930970f9 Move retry related logic to its own file 2019-11-20 20:38:49 -08:00
Ken Hibino
3dddcfbb14 Minor cleanup 2019-11-20 20:27:01 -08:00
Ken Hibino
2dd5f2c5ab Rename manager to processor 2019-11-20 20:10:00 -08:00
Ken Hibino
dd0b0b358c Add tests for type rdb 2019-11-20 07:01:24 -08:00
Ken Hibino
e9069bfb47 Move client and launcher to its own files 2019-11-19 21:19:46 -08:00
Ken Hibino
85a04cbabb Extract redis logic to type rdb 2019-11-19 21:08:06 -08:00
Ken Hibino
4c5b6081de Update todo comments 2019-11-19 07:47:21 -08:00
Ken Hibino
eb6a5032f6 Make Launcher thread safe 2019-11-19 07:46:04 -08:00
Ken Hibino
e238d3835d Gracefully shutdown all scheduled goroutines on (*Launcher).Stop 2019-11-19 07:38:09 -08:00
Ken Hibino
195fd893be Extract manager to its own type 2019-11-19 06:52:26 -08:00
Ken Hibino
8d22d1f6fb Change (*poller).start to use time.Sleep instead of ticker 2019-11-19 06:20:59 -08:00
Ken Hibino
89c54fb47d Rename Workers to Launcher 2019-11-19 06:19:22 -08:00
Ken Hibino
4485b6e3a9 Extract polling logic to poller type 2019-11-18 21:23:49 -08:00
Ken Hibino
3daef02632 Fix bug around releasing semaphore token 2019-11-18 07:42:26 -08:00
Ken Hibino
c6f482d4f8 Make Run method stateful 2019-11-17 21:21:32 -08:00
Ken Hibino
62db9863fb Send retry exhausted tasks to "dead" zset 2019-11-17 21:13:41 -08:00