mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Formatting
This commit is contained in:
parent
18ce20ab58
commit
d39b02e587
@ -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...")
|
||||||
|
|||||||
@ -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")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user