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

@ -141,6 +141,7 @@ class EventProcessor(threading.Thread):
try: try:
event_type, camera, event_data = self.event_queue.get(timeout=10) event_type, camera, event_data = self.event_queue.get(timeout=10)
except queue.Empty: except queue.Empty:
if not self.stop_event.is_set():
self.refresh_cache() self.refresh_cache()
continue continue

View File

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