mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 15:15:22 +03:00
Cleanup after recordings refactor
This commit is contained in:
parent
21a50cc452
commit
14c82f8119
@ -57,11 +57,7 @@ class ExternalEventProcessor:
|
||||
thumbnail = self._write_images(
|
||||
camera_config, label, event_id, draw, snapshot_frame
|
||||
)
|
||||
end = (
|
||||
now + duration + camera_config.record.events.post_capture
|
||||
if duration is not None
|
||||
else None
|
||||
)
|
||||
end = now + duration if duration is not None else None
|
||||
|
||||
self.event_sender.publish(
|
||||
(
|
||||
@ -74,7 +70,7 @@ class ExternalEventProcessor:
|
||||
"sub_label": sub_label,
|
||||
"score": score,
|
||||
"camera": camera,
|
||||
"start_time": now - camera_config.record.events.pre_capture,
|
||||
"start_time": now,
|
||||
"end_time": end,
|
||||
"thumbnail": thumbnail,
|
||||
"has_clip": camera_config.record.enabled and include_recording,
|
||||
|
||||
@ -89,7 +89,6 @@ class RecordingCleanup(threading.Thread):
|
||||
|
||||
max_deletes = 100000
|
||||
deleted_reviews_list = list(map(lambda x: x[0], expired_reviews))
|
||||
logger.info(f"the list is {deleted_reviews_list}")
|
||||
for i in range(0, len(deleted_reviews_list), max_deletes):
|
||||
ReviewSegment.delete().where(
|
||||
ReviewSegment.id << deleted_reviews_list[i : i + max_deletes]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user