use a queue for logging

This commit is contained in:
Blake Blackshear
2020-11-03 21:26:39 -06:00
parent af303cbf2a
commit 4c3fea25a5
10 changed files with 93 additions and 66 deletions

View File

@@ -5,6 +5,7 @@ import time
import copy
import cv2
import threading
import logging
import queue
import copy
import numpy as np
@@ -17,6 +18,8 @@ from frigate.config import CameraConfig
from typing import Callable, Dict
from statistics import mean, median
logger = logging.getLogger(__name__)
PATH_TO_LABELS = '/labelmap.txt'
LABELS = load_labels(PATH_TO_LABELS)
@@ -366,7 +369,7 @@ class TrackedObjectProcessor(threading.Thread):
def run(self):
while True:
if self.stop_event.is_set():
print(f"Exiting object processor...")
logger.info(f"Exiting object processor...")
break
try: