Skip to content

v0.22.0

Compare
Choose a tag to compare
@hibiken hibiken released this 19 Feb 14:28
· 186 commits to master since this release

This version improves worker crash recovery by introducing a concept of worker lease for an active task.
It also adds an optional field to Config to customize the context passed to the Handler.

Important Note:
Since this version changes the logic of crash recovery, update of the library version should be done with a clean restart of the process.
In other words, please make sure that the process running asynq.Server shutdown cleanly before restarting the process with this new version.

Added

  • BaseContext is introduced in Config to specify callback hook to provide a base context from which Handler context is derived
  • IsOrphaned field is added to TaskInfo to describe a task left in active state with no worker processing it.

Changed

  • Server now recovers tasks with an expired lease. Recovered tasks are retried/archived with ErrLeaseExpired error.