Skip to content

feat: stale process webhook alert#74

Merged
eclectic-coding merged 2 commits into
mainfrom
feat/stale-process-webhook-alert
May 28, 2026
Merged

feat: stale process webhook alert#74
eclectic-coding merged 2 commits into
mainfrom
feat/stale-process-webhook-alert

Conversation

@eclectic-coding
Copy link
Copy Markdown
Owner

Summary

  • Adds alert_stale_process_threshold config option (integer) — fires a webhook when the number of stale workers meets or exceeds this count
  • A process is considered stale when its last_heartbeat_at has not been updated within SolidQueue.process_alive_threshold (default 5 minutes) — the same threshold used by the Processes page
  • Adds StaleProcessAlert service following the same pattern as the other alert services: async background thread, cooldown tracking, multi-URL fan-out, graceful error logging
  • Triggered from DashboardController#index alongside the existing failure, queue-depth, and slow-job alerts
  • Event name stale_process_detected; no extra duration config required — reuses SolidQueue's own alive threshold

Test plan

  • 13 new specs covering: fires at/above threshold, skips below threshold, skips healthy processes, skips when config or URL missing, skips when no processes exist, cooldown suppresses repeat fires, fires again after cooldown expires, correct JSON payload fields, correct Content-Type, error logged without raising, posts to all URLs in an array
  • Full suite green: 346 examples, 0 failures, 100% line coverage

Closes #61

🤖 Generated with Claude Code

eclectic-coding and others added 2 commits May 28, 2026 06:25
Add StaleProcessAlert service and alert_stale_process_threshold config.
Fires a webhook (event: stale_process_detected) when the number of stale
workers meets or exceeds the configured count. A process is stale when
last_heartbeat_at has not been updated within SolidQueue.process_alive_threshold.
Uses the same alert_webhook_url and alert_webhook_cooldown settings as
other alert types. Triggered on every dashboard page load, subject to cooldown.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… alert

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eclectic-coding eclectic-coding merged commit 4e815b0 into main May 28, 2026
7 checks passed
@eclectic-coding eclectic-coding deleted the feat/stale-process-webhook-alert branch May 28, 2026 10:27
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.

feat: process stale webhook alert

1 participant