mirror of
https://github.com/langgenius/dify.git
synced 2024-11-15 19:22:36 +08:00
Submitting tasks in a loop
This commit is contained in:
parent
fc37e654fc
commit
e2e5e0e22e
|
@ -916,10 +916,12 @@ class DocumentService:
|
|||
db.session.commit()
|
||||
|
||||
# trigger async task
|
||||
if document_ids:
|
||||
document_indexing_task.delay(dataset.id, document_ids)
|
||||
if duplicate_document_ids:
|
||||
duplicate_document_indexing_task.delay(dataset.id, duplicate_document_ids)
|
||||
if document_ids:
|
||||
for dociment_id in document_ids:
|
||||
document_indexing_task.delay(dataset.id, [dociment_id])
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user