This commit is contained in:
2026-06-20 19:16:44 +08:00
parent db3d030169
commit dbb87823e8
26 changed files with 676 additions and 115 deletions
+8
View File
@@ -83,6 +83,14 @@ func IsPermanent(err error) bool {
return errors.As(err, &pe)
}
// ErrLeaseLost is returned by the terminal/retry write-back methods
// (Complete, FailWithRetry, DeadLetter) when the fencing predicate matches no
// row: the job is no longer leased by this worker (e.g. the reaper re-leased it
// to another worker after the lease timeout). The caller must treat this as a
// no-op — the write was correctly dropped to avoid clobbering the new run's
// state — and must NOT surface it as a failure that triggers further retries.
var ErrLeaseLost = errors.New("job lease lost; write-back skipped")
// RunnerConfig is the per-runner configuration loaded from config.yaml.
// Zero Interval means "use the runner's documented default".
type RunnerConfig struct {