Skip to content

feat: slow job webhook alert#73

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

feat: slow job webhook alert#73
eclectic-coding merged 2 commits into
mainfrom
feat/slow-job-webhook-alert

Conversation

@eclectic-coding
Copy link
Copy Markdown
Owner

Summary

  • Adds alert_slow_job_count_threshold config option (integer) — fires a webhook when the number of currently-running slow claimed jobs meets or exceeds this count
  • Adds SlowJobAlert service following the same pattern as AlertWebhook and QueueDepthAlert: async background thread, cooldown tracking, multi-URL fan-out, graceful error logging
  • Triggers from DashboardController#index alongside the existing failure and queue-depth alerts
  • Event name slow_job_threshold_exceeded; requires slow_job_threshold to also be set (defines what "slow" means)

Test plan

  • 13 new specs covering: fires at/above threshold, skips below threshold, skips when either config is missing, skips without a webhook URL, 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: 333 examples, 0 failures, 100% line coverage

Closes #60

🤖 Generated with Claude Code

eclectic-coding and others added 2 commits May 28, 2026 06:18
Add SlowJobAlert service and alert_slow_job_count_threshold config option.
Fires a webhook (event: slow_job_threshold_exceeded) when the number of
currently-running slow claimed jobs meets or exceeds the configured count.
Requires slow_job_threshold to be set (defines what "slow" means). 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>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eclectic-coding eclectic-coding merged commit eec379f into main May 28, 2026
5 checks passed
@eclectic-coding eclectic-coding deleted the feat/slow-job-webhook-alert branch May 28, 2026 10:20
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: slow job webhook alert

1 participant