mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 14:15:22 +03:00
remove debug code and fix import
This commit is contained in:
parent
53c0a2a7e8
commit
a1fea82409
@ -1,4 +1,5 @@
|
|||||||
import faulthandler
|
import faulthandler
|
||||||
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from flask import cli
|
from flask import cli
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
import base64
|
import base64
|
||||||
import io
|
import io
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
import threading
|
import threading
|
||||||
from multiprocessing.synchronize import Event as MpEvent
|
from multiprocessing.synchronize import Event as MpEvent
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
@ -165,13 +164,7 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
ids=[event.id],
|
ids=[event.id],
|
||||||
)
|
)
|
||||||
|
|
||||||
base_dir = f"/tmp/ai/{event.id}"
|
logger.debug(
|
||||||
os.makedirs(base_dir, exist_ok=True)
|
|
||||||
for index, thumbnail in enumerate(thumbnails):
|
|
||||||
with open(f"{base_dir}/{index}.jpg", "wb") as f:
|
|
||||||
f.write(thumbnail)
|
|
||||||
|
|
||||||
logger.info(
|
|
||||||
"Generated description for %s (%d images): %s",
|
"Generated description for %s (%d images): %s",
|
||||||
event.id,
|
event.id,
|
||||||
len(thumbnails),
|
len(thumbnails),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user