Asynq v0.10.0.rc1 Release Notes

Release Date: 2020-07-04 // almost 4 years ago
  • Beta version for v0.10 includes the following API changes:

    • (*Client).Enqueue, (*Client).EnqueueIn, and (*Client).EnqueueAt has changed to return a *Result and error. A Result struct contains metadata about task that was enqueued (e.g. ID, Queue, etc).
    • ErrorHandler signature has changed to func(context.Context, *Task, error). Please use GetRetryCount(ctx) and/or 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 Handler needed to explicitly return an error when ctx.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 check ctx.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.