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 inConfig
to specify callback hook to provide a basecontext
from whichHandler
context
is derivedIsOrphaned
field is added toTaskInfo
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 withErrLeaseExpired
error.