Releases: hibiken/asynq
Releases · hibiken/asynq
v0.10.0.rc1
Beta version for v0.10 includes the following API changes:
(*Client).Enqueue
,(*Client).EnqueueIn
, and(*Client).EnqueueAt
has changed to return a*Result
anderror
. AResult
struct contains metadata about task that was enqueued (e.g. ID, Queue, etc).ErrorHandler
signature has changed tofunc(context.Context, *Task, error)
. Please useGetRetryCount(ctx)
and/orGetMaxRetry(ctx)
to get the count values that was part of the argument list in the previous versions.
Beta version for v0.10 includes the following semantics changes:
- All tasks now require timeout or deadline. By default, timeout is set to 1800 seconds(i.e. 30 mins) if none of them are specified.
- Tasks that exceed its deadline are automatically retried. In the previous versions, User provided
Handler
needed to explicitly return an error whenctx.Done
channel is closed. In the new version, this is taken care of by the library. In order to avoid processing tasks when its deadline is exceeded,Handler
should always checkctx.Done
channel and stop processing when the channel is closed.
Other important changes:
- Please upgrade to the new version of asynq CLI which is compatible with the new version of the library.
- Encoding schema for messages has changed. Please install the latest CLI and run
migrate
command if you have tasks enqueued with the previous version of asynq.