Heartbeat renew failures were only logged, so under DB flakiness a job could be leased twice concurrently — the original worker kept crawling past a lapsed lease while another re-leased it. Track consecutive renew failures and, after MAX_HEARTBEAT_RENEW_FAILURES, signal the worker (via a CancellationToken) to abandon the in-flight dispatch instead of working a job it no longer owns. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
864 B
864 B