forked from Github/frigate
Performance increase with lots of recordings (#8525)
* Performance increase with lots of recordings * Formatting + review * Update 020_update_index_recordings.py Formatting * Feedback + check fix * Update 020_update_index_recordings.py
This commit is contained in:
@@ -35,7 +35,7 @@ class StorageMaintainer(threading.Thread):
|
||||
if self.camera_storage_stats.get(camera, {}).get("needs_refresh", True):
|
||||
self.camera_storage_stats[camera] = {
|
||||
"needs_refresh": (
|
||||
Recordings.select(fn.COUNT(Recordings.id))
|
||||
Recordings.select(fn.COUNT("*"))
|
||||
.where(Recordings.camera == camera, Recordings.segment_size > 0)
|
||||
.scalar()
|
||||
< 50
|
||||
|
||||
Reference in New Issue
Block a user