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

23 Commits

Author SHA1 Message Date
Ken Hibino
7e942ec241 Use int64 type for Timeout and Deadline in TaskMessage 2020-07-06 05:48:31 -07:00
Ken Hibino
716d3d987e Use default timeout of 30mins if both timeout and deadline are not
provided
2020-07-06 05:48:31 -07:00
Ken Hibino
e33d297d8e Add SetDefaultOptions method to Client 2020-04-27 06:45:13 -07:00
Ken Hibino
c33dd447ac Allow client to enqueue a task with unique option
Changes:

- Added Unique option for clients
- Require go v.13 or above (to use new errors wrapping functions)
- Fixed adding queue key to all-queues set (asynq:queues) when scheduling.
2020-03-21 11:40:40 -07:00
Ken Hibino
9c79a7d507 Simplify code with gofmt -s 2020-03-13 14:24:24 -07:00
Ken Hibino
3c722386b0 Add Deadline option when enqueuing tasks
Deadline option sets the deadline for the given task's context deadline.
2020-03-08 17:12:42 -07:00
Ken Hibino
49c117f4d1 Change Client APIs
Use `Enqueue`, `EnqueueAt`, and `EnqueueIn` to enqueue and schedule
tasks.
`Schedule` method was removed.
2020-02-23 20:40:40 -08:00
Ken Hibino
e21fe3bd79 Add ListWorkers to RDB 2020-02-22 21:21:55 -08:00
Ken Hibino
39459b4412 Allow user to specify timeout per task 2020-02-13 06:23:51 -08:00
Ken Hibino
f66a65d6ca Fix tests 2020-01-16 21:04:46 -08:00
Ken Hibino
97316d6766 Fix flaky tests
Some tests were failing due to mismatch in Score in ZSetEntry.
Changed ZSetEntry Score to float64 type so that we can use
cmpopts.EquateApprox to allow for margin when comparing.
2020-01-11 10:09:15 -08:00
Ken Hibino
ca78b92078 Add Queue option to allow user to specify queue from client
Added base.QueueKey method to get redis key for given queue name.
Changed asynqtest.GetEnqueuedMessages to optionally take queue name.
2020-01-07 21:55:18 -08:00
Ken Hibino
f3a23b9b12 Make Task type immutable
This change makes it impossible to mutate payload within Handler or
RetryDelayFunc.
2020-01-05 09:55:39 -08:00
Ken Hibino
606b0fae64 Rename Client Process method to Schedule 2020-01-03 20:29:35 -08:00
Ken Hibino
c62833540c Add license comment to all src files 2020-01-02 18:13:16 -08:00
Ken Hibino
62624cb0d8 Change NewClient API to take *redis.Client 2019-12-29 14:55:16 -08:00
Ken Hibino
ae0c2f9ca5 Use asynqtest helpers in asynq package tests 2019-12-29 10:05:02 -08:00
Ken Hibino
3fd248615b Create base internal package 2019-12-22 07:40:25 -08:00
Ken Hibino
f5b7e0cccd Document options precedence 2019-12-21 10:02:03 -08:00
Ken Hibino
4229073a24 Allow user to define a max retry count for a task 2019-12-21 09:47:45 -08:00
Ken Hibino
437fb03bb3 Unexport redis key name constants from rdb package 2019-12-04 17:23:11 -08:00
Ken Hibino
d4e442d04f Extract rdb to internal package 2019-12-03 22:13:48 -08:00
Ken Hibino
634af38e3a Add test for client 2019-11-29 17:40:31 -08:00