Skip to content

Commit

Permalink
dont refresh cache if exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeblackshear committed Aug 8, 2020
1 parent f3db69d commit 469259d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions frigate/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,12 @@ def run(self):
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()
Expand Down
2 changes: 1 addition & 1 deletion frigate/object_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_current_frame(self, camera):
def run(self):
while True:
if self.stop_event.is_set():
print(f"Exiting event processor...")
print(f"Exiting object processor...")
break

try:
Expand Down

0 comments on commit 469259d

Please sign in to comment.