Browse Source

delete segment not commit (#309)

tags/0.3.2
Jyong 2 years ago
parent
commit
35a2beb195
No account linked to committer's email address
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      api/tasks/clean_document_task.py
  2. 1
    1
      api/tasks/document_indexing_update_task.py

+ 1
- 1
api/tasks/clean_document_task.py View File

@@ -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'))

+ 1
- 1
api/tasks/document_indexing_update_task.py View File

@@ -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…
Cancel
Save