Fix recording cleanup logic again (#13527)

This commit is contained in:
Nicolas Mowen 2024-09-03 15:56:26 -06:00 committed by GitHub
parent 7626dd239a
commit e80322dab7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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