Procházet zdrojové kódy

delete segment not commit (#309)

tags/0.3.2
Jyong před 2 roky
rodič
revize
35a2beb195
Žádný účet není propojen s e-mailovou adresou tvůrce revize

+ 1
- 1
api/tasks/clean_document_task.py Zobrazit soubor

@@ -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 Zobrazit soubor

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

Načítá se…
Zrušit
Uložit