forked from Github/frigate
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:
@@ -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