mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-06-04 11:14:10 +08:00
update delete embeddings by id (#6489)
This commit is contained in:
parent
1e0e573165
commit
f73a3a58ae
@ -25,9 +25,10 @@ def clean_embedding_cache_task():
|
||||
except NotFound:
|
||||
break
|
||||
if embedding_ids:
|
||||
db.session.execute(text(
|
||||
"DELETE FROM embeddings WHERE id in :embedding_ids"
|
||||
), {'embedding_ids': tuple(embedding_ids)})
|
||||
for embedding_id in embedding_ids:
|
||||
db.session.execute(text(
|
||||
"DELETE FROM embeddings WHERE id = :embedding_id"
|
||||
), {'embedding_id': embedding_id})
|
||||
|
||||
db.session.commit()
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user