From 1eeb293f6504136d1353dd1b60c6429078b89b66 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 18 Oct 2026 12:15:35 -0500 Subject: [PATCH] release the motion search slot if the runner fails to start --- frigate/jobs/motion_search.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frigate/jobs/motion_search.py b/frigate/jobs/motion_search.py index a5f3d73090..cd4c4fd515 100644 --- a/frigate/jobs/motion_search.py +++ b/frigate/jobs/motion_search.py @@ -911,8 +911,12 @@ def start_motion_search_job( _motion_search_jobs[job.id] = (job, cancel_event) - runner = MotionSearchRunner(job, config, cancel_event) - runner.start() + try: + MotionSearchRunner(job, config, cancel_event).start() + except Exception: + with _jobs_lock: + del _motion_search_jobs[job.id] + raise logger.debug( "Started motion search job %s for camera %s: "