mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-06 23:05:42 +01:00
Do file renaming first, since this is the important step, and indexing takes a while.
This commit is contained in:
parent
beed820602
commit
1df922ef16
1 changed files with 4 additions and 1 deletions
|
|
@ -94,7 +94,10 @@ def bulk_update_documents(document_ids):
|
|||
documents = Document.objects.filter(id__in=document_ids)
|
||||
|
||||
ix = index.open_index()
|
||||
|
||||
for doc in documents:
|
||||
post_save.send(Document, instance=doc, created=False)
|
||||
|
||||
with AsyncWriter(ix) as writer:
|
||||
for doc in documents:
|
||||
index.update_document(writer, doc)
|
||||
post_save.send(Document, instance=doc, created=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue