Fix repair worker crash on zero interval_hours division

Jobs with interval_hours set to 0 caused ZeroDivisionError in
_pick_next_job staleness calculation. Now skips jobs with invalid
(zero or negative) intervals.
This commit is contained in:
Broque Thomas 2026-04-20 13:46:38 -07:00
parent c63766145e
commit 2249aa7594

View file

@ -489,6 +489,9 @@ class RepairWorker:
continue
interval_hours = config['interval_hours']
if not interval_hours or interval_hours <= 0:
continue # Skip jobs with invalid interval
last_run = self._get_last_run(job_id)
if not last_run or not last_run.get('finished_at'):