dont refresh cache if exiting

This commit is contained in:
Blake Blackshear 2020-08-08 07:39:57 -05:00
parent f3db69d975
commit 469259d663
2 changed files with 4 additions and 3 deletions

View File

@ -137,11 +137,12 @@ class EventProcessor(threading.Thread):
if self.stop_event.is_set():
print(f"Exiting event processor...")
break
try:
event_type, camera, event_data = self.event_queue.get(timeout=10)
except queue.Empty:
self.refresh_cache()
if not self.stop_event.is_set():
self.refresh_cache()
continue
self.refresh_cache()

View File

@ -105,7 +105,7 @@ class TrackedObjectProcessor(threading.Thread):
def run(self):
while True:
if self.stop_event.is_set():
print(f"Exiting event processor...")
print(f"Exiting object processor...")
break
try: