0.16.0 - Lease We Can Do
Docket 0.16 makes a subtle change that should make longer-running tasks much more reliable: workers will now periodically renew the leases for all of the tasks they are currently managing so that they aren't redelivered to new workers while they are still healthily executing. Over docket's lifetime so far, the redelivery mechanism has been one of the flakiest and maddening things, and this simple change should make things much more easy to think about for task developers.
Prior to this change, you'd have to think about redelivery in terms of the slowest tasks you intended to run on that docket, and would have to suffer long redelivery delays to accomodate those slow tasks. Worse, the implicit timeout at redelivery_timeout caused a race between Docket and Redis, resulting in occasional duplication of those tasks.
Breaking changes
Docket in versions prior to 0.16 would add an implicit timeout to all tasks that didn't declare one itself. This timeout was set to the redelivery_timeout. This timeout is no longer added automatically so you may want to add your own Timeout if you were depending on that.
What's Changed
- Add lease renewal to prevent XAUTOCLAIM race condition by @chrisguidry in #250
- Wait for strikes to load before scheduling automatic perpetuals by @chrisguidry in #251
- Add fallback_task for handling unknown tasks by @chrisguidry in #252
- Fix flaky heartbeat timing assertions in worker tests by @chrisguidry in #254
- Support registering tasks with custom names by @chrisguidry in #256
Full Changelog: 0.15.6...0.16.0