mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-20 13:42:47 +03:00
release the motion search slot if the runner fails to start
This commit is contained in:
@@ -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: "
|
||||
|
||||
Reference in New Issue
Block a user