From b33f4e2dc69de7a0d36f09d6cb857dc5b3177968 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Thu, 12 Aug 2021 06:42:44 -0500 Subject: [PATCH] assume the clip for the event exists with recordings --- frigate/events.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/frigate/events.py b/frigate/events.py index 84c220b89..4ea9e16bd 100644 --- a/frigate/events.py +++ b/frigate/events.py @@ -63,25 +63,6 @@ class EventProcessor(threading.Thread): return True - def verify_clip(self, camera, end_time): - # check every 5 seconds for the last required recording - for _ in range(4): - recordings_count = ( - Recordings.select() - .where(Recordings.camera == camera, Recordings.end_time > end_time) - .limit(1) - .count() - ) - if recordings_count > 0: - return True - logger.debug(f"Missing recording for {camera} clip. Waiting...") - time.sleep(5) - - logger.warning( - f"Unable to verify clip for {camera}. There were no recordings for this camera." - ) - return False - def run(self): while not self.stop_event.is_set(): try: @@ -99,13 +80,6 @@ class EventProcessor(threading.Thread): has_clip = self.should_create_clip(camera, event_data) - # Wait for recordings to be ready - if has_clip: - has_clip = self.verify_clip( - camera, - event_data["end_time"] + record_config.events.post_capture, - ) - if has_clip or event_data["has_snapshot"]: Event.create( id=event_data["id"],