From 2249aa75943933f1774a8c68f7b208e05e90b61e Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:46:38 -0700 Subject: [PATCH] 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. --- core/repair_worker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/repair_worker.py b/core/repair_worker.py index 4002f50c..207f9df0 100644 --- a/core/repair_worker.py +++ b/core/repair_worker.py @@ -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'):