mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Don't count in progress events as duplicates (#7568)
* Don't count in progress events as duplicates * Fix sql
This commit is contained in:
parent
b538572afb
commit
bbdf5e1bee
@ -168,6 +168,7 @@ class EventCleanup(threading.Thread):
|
|||||||
camera,
|
camera,
|
||||||
has_snapshot,
|
has_snapshot,
|
||||||
has_clip,
|
has_clip,
|
||||||
|
end_time,
|
||||||
row_number() over (
|
row_number() over (
|
||||||
partition by label, camera, round(start_time/5,0)*5
|
partition by label, camera, round(start_time/5,0)*5
|
||||||
order by end_time-start_time desc
|
order by end_time-start_time desc
|
||||||
@ -176,7 +177,7 @@ class EventCleanup(threading.Thread):
|
|||||||
)
|
)
|
||||||
|
|
||||||
select distinct id, camera, has_snapshot, has_clip from grouped_events
|
select distinct id, camera, has_snapshot, has_clip from grouped_events
|
||||||
where copy_number > 1;"""
|
where copy_number > 1 and end_time not null;"""
|
||||||
|
|
||||||
duplicate_events = Event.raw(duplicate_query)
|
duplicate_events = Event.raw(duplicate_query)
|
||||||
for event in duplicate_events:
|
for event in duplicate_events:
|
||||||
|
Loading…
Reference in New Issue
Block a user