From 29f9bd4570b5d2b29bbb16a8775619f51bf3dd7e Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Tue, 6 Jun 2023 07:31:30 -0600 Subject: [PATCH] Limit to 1 row since that is all that is used --- frigate/record/cleanup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/record/cleanup.py b/frigate/record/cleanup.py index bb54d8b86..c87eecacd 100644 --- a/frigate/record/cleanup.py +++ b/frigate/record/cleanup.py @@ -180,7 +180,7 @@ class RecordingCleanup(threading.Thread): # find all the recordings older than the oldest recording in the db try: - oldest_recording = Recordings.select().order_by(Recordings.start_time).get() + oldest_recording = Recordings.select().order_by(Recordings.start_time).limit(1).get() p = Path(oldest_recording.path) oldest_timestamp = p.stat().st_mtime - 1