mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Limit to 1 row since that is all that is used
This commit is contained in:
parent
3e93015b8f
commit
29f9bd4570
@ -180,7 +180,7 @@ class RecordingCleanup(threading.Thread):
|
|||||||
|
|
||||||
# find all the recordings older than the oldest recording in the db
|
# find all the recordings older than the oldest recording in the db
|
||||||
try:
|
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)
|
p = Path(oldest_recording.path)
|
||||||
oldest_timestamp = p.stat().st_mtime - 1
|
oldest_timestamp = p.stat().st_mtime - 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user