From a7bb0931c425854a498d49c5a7cd700048553a01 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 22 Jan 2021 16:58:14 -0600 Subject: [PATCH] if detection stopped, assume the container needs a restart --- frigate/watchdog.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frigate/watchdog.py b/frigate/watchdog.py index 5987d90e9c..30ca5aa81b 100644 --- a/frigate/watchdog.py +++ b/frigate/watchdog.py @@ -2,6 +2,8 @@ import logging import threading import time +import os +import signal logger = logging.getLogger(__name__) @@ -32,5 +34,5 @@ def run(self): logger.info("Detection appears to be stuck. Restarting detection process") detector.start_or_restart() elif not detector.detect_process.is_alive(): - logger.info("Detection appears to have stopped. Restarting detection process") - detector.start_or_restart() + logger.info("Detection appears to have stopped. Restarting frigate") + os.kill(os.getpid(), signal.SIGTERM)