Asynq v0.10.0.rc1 Release NotesRelease Date: 2020-07-04 // over 1 year ago
Beta version for v0.10 includes the following API changes:
(*Client).EnqueueAthas changed to return a
Resultstruct contains metadata about task that was enqueued (e.g. ID, Queue, etc).
ErrorHandlersignature has changed to
func(context.Context, *Task, error). Please use
GetMaxRetry(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:
- 0️⃣ 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
Handlerneeded to explicitly return an error when
ctx.Donechannel 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,
Handlershould always check
ctx.Donechannel 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
migratecommand if you have tasks enqueued with the previous version of asynq.