Skip to content

feat: add heartbeat + bot-side reaper for worker reliability#26

Merged
abrichr merged 2 commits intomainfrom
feat/heartbeat-reaper
Mar 19, 2026
Merged

feat: add heartbeat + bot-side reaper for worker reliability#26
abrichr merged 2 commits intomainfrom
feat/heartbeat-reaper

Conversation

@abrichr
Copy link
Member

@abrichr abrichr commented Mar 19, 2026

Worker heartbeat every 30s + bot reaper every 60s. Zero new infra. Re-queues stuck jobs within ~2 min.

abrichr and others added 2 commits March 19, 2026 13:53
Worker writes heartbeat_at every 30s during processing. Bot reaper
runs every 60s, detects stale running jobs (heartbeat >90s old),
re-queues them with CAS safety. Includes Telegram notifications
and startup crash recovery.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Supabase `.update()` without `.select()` returns `null` for data,
causing TypeScript to infer it as `never`. Adding `.select('id')`
matches the pattern used in the re-queue path above.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@abrichr abrichr merged commit e99cdbe into main Mar 19, 2026
1 check passed
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