github hibiken/asynq v0.10.0

latest releases: v0.25.0, v0.24.1, v0.24.0...
4 years ago

Added Features

  • Automatic recovery of tasks in the event of a worker crash
  • Automatic retry of tasks which exceeded its timeout/deadline

Version 0.10.0 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).

Version 0.10.0 includes the following semantics changes:

  • All tasks now require timeout or deadline. By default, timeout is set to 1800 seconds(30 mins) if neither 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.

Don't miss a new asynq release

NewReleases is sending notifications on new releases.