Fix recording cleanup logic again

This commit is contained in:
Nicolas Mowen 2024-09-03 15:46:49 -06:00
parent 9afa1354da
commit 4bc8d4bb3e

View File

@ -74,14 +74,12 @@ class RecordingCleanup(threading.Thread):
.where(ReviewSegment.camera == config.name) .where(ReviewSegment.camera == config.name)
.where( .where(
( (
ReviewSegment.severity (ReviewSegment.severity == "alert")
== "alert" & ReviewSegment.end_time & (ReviewSegment.end_time < alert_expire_date)
< alert_expire_date
) )
| ( | (
ReviewSegment.severity (ReviewSegment.severity == "detection")
== "detection" & ReviewSegment.end_time & (ReviewSegment.end_time < detection_expire_date)
< detection_expire_date
) )
) )
.namedtuples() .namedtuples()