Skip to content

Keep HeartbeatManager beating through transient errors - #3

Open
janbjorge wants to merge 2 commits into
mainfrom
claude/code-review-bugs-vokwlk
Open

janbjorge wants to merge 2 commits into
mainfrom
claude/code-review-bugs-vokwlk

Conversation

@janbjorge

@janbjorge janbjorge commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Stack 1/9, base main.

_beat() returned on any JQueueError, so one StorageError stopped heartbeats for good. Now it stops only on JobNotFoundError and retries other errors.

Tests: test_transient_error_does_not_stop_heartbeat, test_persistent_transient_error_keeps_retrying fail on base; test_job_not_found_stops_heartbeat_silently passes on both.

_beat() caught JQueueError and returned. StorageError and
CASConflictError are JQueueErrors too, so a single storage blip or
exhausted CAS retries stopped heartbeats permanently and silently. The
job then went stale and was re-queued while the worker was still
running it, leading to duplicate execution.

Stop only on JobNotFoundError (job acked/removed); skip the beat and
retry on the next interval for any other JQueueError.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant