Back to Source Monitor

Health Check Status Transition

.vbw-planning/milestones/polish-and-reliability/phases/01-backend-fixes/PLAN-02-SUMMARY.md

0.13.0626 B
Original Source

What Was Built

  • Added trigger_fetch_if_degraded to SourceHealthCheckJob that enqueues FetchFeedJob.perform_later(source.id, force: true) after a successful health check on a degraded source (declining/critical/warning)
  • Added 5 tests covering all degraded statuses, healthy source exclusion, and failed health check exclusion

Files Modified

  • app/jobs/source_monitor/source_health_check_job.rb -- added DEGRADED_STATUSES constant, trigger_fetch_if_degraded private method, call in perform
  • test/jobs/source_monitor/source_health_check_job_test.rb -- 5 new test cases (10 total, 46 assertions, 0 failures)