mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-01 19:30:33 +03:00
Reduce database queries to necessary fields (#7751)
* Reduce database queries to necessary labels * Set columns for other queries * skip creating model instances --------- Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
This commit is contained in:
co-authored by
Blake Blackshear
parent
5658e5a4cc
commit
a2206bb177
@@ -152,7 +152,10 @@ class RecordingMaintainer(threading.Thread):
|
||||
# get all events with the end time after the start of the oldest cache file
|
||||
# or with end_time None
|
||||
events: Event = (
|
||||
Event.select()
|
||||
Event.select(
|
||||
Event.start_time,
|
||||
Event.end_time,
|
||||
)
|
||||
.where(
|
||||
Event.camera == camera,
|
||||
(Event.end_time == None)
|
||||
|
||||
Reference in New Issue
Block a user