Formatting

This commit is contained in:
Nick Mowen 2023-05-01 15:24:20 -06:00
parent 18ce20ab58
commit d39b02e587
2 changed files with 4 additions and 3 deletions

View File

@ -9,7 +9,7 @@ from pathlib import Path
from peewee import fn from peewee import fn
from frigate.config import FrigateConfig from frigate.config import FrigateConfig
from frigate.const import CLIPS_DIR from frigate.const import CLIPS_DIR
from frigate.models import Event from frigate.models import Event
@ -17,6 +17,7 @@ from multiprocessing.synchronize import Event as MpEvent
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class EventCleanup(threading.Thread): class EventCleanup(threading.Thread):
def __init__(self, config: FrigateConfig, stop_event: MpEvent): def __init__(self, config: FrigateConfig, stop_event: MpEvent):
threading.Thread.__init__(self) threading.Thread.__init__(self)
@ -172,4 +173,4 @@ class EventCleanup(threading.Thread):
) )
delete_query.execute() delete_query.execute()
logger.info(f"Exiting event cleanup...") logger.info(f"Exiting event cleanup...")

View File

@ -79,7 +79,7 @@ class ExternalEventProcessor:
error_image = glob.glob("/opt/frigate/frigate/images/external-event.png") error_image = glob.glob("/opt/frigate/frigate/images/external-event.png")
if len(error_image) > 0: if len(error_image) > 0:
with open("/opt/frigate/frigate/images/external-event.png", 'rb') as img: with open("/opt/frigate/frigate/images/external-event.png", "rb") as img:
img_bytes = img.read() img_bytes = img.read()
self.default_thumbnail = base64.b64encode(img_bytes).decode("utf-8") self.default_thumbnail = base64.b64encode(img_bytes).decode("utf-8")