Fix event only datetime check (#8500)

This commit is contained in:
Nicolas Mowen 2023-11-07 04:32:31 -07:00 committed by GitHub
parent 257bd89733
commit 92906a500a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,7 +272,7 @@ class RecordingMaintainer(threading.Thread):
)
retain_cutoff = datetime.datetime.fromtimestamp(
most_recently_processed_frame_time - pre_capture
)
).astimezone(datetime.timezone.utc)
if end_time < retain_cutoff:
Path(cache_path).unlink(missing_ok=True)
self.end_time_cache.pop(cache_path, None)