mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-13 06:19:04 +08:00
delete segment not commit (#309)
This commit is contained in:
parent
2056093855
commit
35a2beb195
@ -43,7 +43,7 @@ def clean_document_task(document_id: str, dataset_id: str):
|
||||
|
||||
for segment in segments:
|
||||
db.session.delete(segment)
|
||||
|
||||
db.session.commit()
|
||||
end_at = time.perf_counter()
|
||||
logging.info(
|
||||
click.style('Cleaned document when document deleted: {} latency: {}'.format(document_id, end_at - start_at), fg='green'))
|
||||
|
@ -59,7 +59,7 @@ def document_indexing_update_task(dataset_id: str, document_id: str):
|
||||
|
||||
for segment in segments:
|
||||
db.session.delete(segment)
|
||||
|
||||
db.session.commit()
|
||||
end_at = time.perf_counter()
|
||||
logging.info(
|
||||
click.style('Cleaned document when document update data source or process rule: {} latency: {}'.format(document_id, end_at - start_at), fg='green'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user