mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-28 01:26:14 +00:00
Set in_process flag during update_document_content_maybe_archive_file
This commit is contained in:
@@ -250,6 +250,7 @@ def update_document_content_maybe_archive_file(document_id):
|
||||
it exists.
|
||||
"""
|
||||
document = Document.objects.get(id=document_id)
|
||||
Document.objects.filter(pk=document_id).update(in_process=True)
|
||||
|
||||
mime_type = document.mime_type
|
||||
|
||||
@@ -349,6 +350,7 @@ def update_document_content_maybe_archive_file(document_id):
|
||||
)
|
||||
finally:
|
||||
parser.cleanup()
|
||||
Document.objects.filter(pk=document_id).update(in_process=False)
|
||||
|
||||
|
||||
@shared_task
|
||||
|
Reference in New Issue
Block a user