Repository navigation
Release v1.25.0
Jobs interrupted while preparing or starting their steps now recover, and jobs get one place to run crash-safe initialization before any step delivers work.
Added
Job.OnBeforeDispatchingJobSteps(JobStepDispatchContext), an optional hook that runs before any step starts, both when a job starts and when it resumes.JobStepDispatchContext.InitializationMayBeIncompleteistruewhen the job is recovering from a crash during startup, so the job can finish or repeat its own one-time initialization (#40)CannotResumeJobError.MissingStepPlan: a job saved by an earlier version while it was preparing or starting its steps cannot be resumed safely and now fails with this reason instead of being planned again (#40)StartJobError.InvalidStepPlan: starting a job fails early when a step request cannot be saved and read back as JSON (#40)
Fixed
- A job whose silo died while it was preparing or starting its steps is recovered: it keeps the same step IDs, prepares only the steps that were not prepared yet, never runs
PrepareStepsor the start hook twice, and never counts a step's outcome twice. A saved but unstarted job is no longer removed as dead during rehydration, and a job left in a starting state after a restart is no longer reported as already running (#40)