mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-01-21 00:06:44 +01:00
if recording not on disk, delete from db and return
This commit is contained in:
parent
4d2d11193f
commit
675f21e23a
@ -497,7 +497,8 @@ class RecordingCleanup(threading.Thread):
|
|||||||
oldest_timestamp = datetime.datetime.now().timestamp()
|
oldest_timestamp = datetime.datetime.now().timestamp()
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logger.warning(f"Unable to find file from recordings database: {p}")
|
logger.warning(f"Unable to find file from recordings database: {p}")
|
||||||
oldest_timestamp = datetime.datetime.now().timestamp()
|
Recordings.delete().where(Recordings.id == oldest_recording.id).execute()
|
||||||
|
return
|
||||||
|
|
||||||
logger.debug(f"Oldest recording in the db: {oldest_timestamp}")
|
logger.debug(f"Oldest recording in the db: {oldest_timestamp}")
|
||||||
process = sp.run(
|
process = sp.run(
|
||||||
|
Loading…
Reference in New Issue
Block a user