mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
delete only existing ids in event cleanup
This commit is contained in:
parent
e98b402cdf
commit
cbc98c5b46
@ -230,7 +230,12 @@ class EventCleanup(threading.Thread):
|
|||||||
Event.delete().where(Event.id << chunk).execute()
|
Event.delete().where(Event.id << chunk).execute()
|
||||||
|
|
||||||
if self.config.semantic_search.enabled:
|
if self.config.semantic_search.enabled:
|
||||||
self.embeddings.thumbnail.delete(ids=chunk)
|
for collection in [
|
||||||
self.embeddings.description.delete(ids=chunk)
|
self.embeddings.thumbnail,
|
||||||
|
self.embeddings.description,
|
||||||
|
]:
|
||||||
|
existing_ids = collection.get(ids=chunk, include=[])["ids"]
|
||||||
|
if existing_ids:
|
||||||
|
collection.delete(ids=existing_ids)
|
||||||
|
|
||||||
logger.info("Exiting event cleanup...")
|
logger.info("Exiting event cleanup...")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user