From 01bf89907db8fdbc818c311ca5dfd22a44fafa89 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 25 Feb 2020 20:36:30 -0600 Subject: [PATCH] dont kill the camera process from the main process --- detect_objects.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/detect_objects.py b/detect_objects.py index ddbefec37..16d706e84 100644 --- a/detect_objects.py +++ b/detect_objects.py @@ -70,17 +70,6 @@ class CameraWatchdog(threading.Thread): for name, camera_process in self.camera_processes.items(): process = camera_process['process'] - if (not self.object_processor.get_current_frame_time(name) is None and - (datetime.datetime.now().timestamp() - self.object_processor.get_current_frame_time(name)) > 30): - print(f"Last frame for {name} is more than 30 seconds old...") - if process.is_alive(): - process.terminate() - print("Waiting for process to exit gracefully...") - process.join(timeout=30) - if process.exitcode is None: - print("Process didnt exit. Force killing...") - process.kill() - process.join() if not process.is_alive(): print(f"Process for {name} is not alive. Starting again...") camera_process['fps'].value = float(self.config[name]['fps'])