Compare commits

...

2 Commits

Author SHA1 Message Date
Qiuzg
ff74921282
Merge e2e5e0e22e into 5ff02b469f 2024-11-15 09:37:33 +09:00
root
e2e5e0e22e Submitting tasks in a loop 2024-10-29 14:28:57 +08:00

View File

@ -916,10 +916,12 @@ class DocumentService:
db.session.commit() db.session.commit()
# trigger async task # trigger async task
if document_ids: if document_ids:
document_indexing_task.delay(dataset.id, document_ids) for dociment_id in document_ids:
if duplicate_document_ids: document_indexing_task.delay(dataset.id, [dociment_id])
duplicate_document_indexing_task.delay(dataset.id, duplicate_document_ids) if duplicate_document_ids:
for duplicate_document_id in duplicate_document_ids:
duplicate_document_indexing_task.delay(dataset.id, [duplicate_document_id])
return documents, batch return documents, batch