mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05: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. |     it exists. | ||||||
|     """ |     """ | ||||||
|     document = Document.objects.get(id=document_id) |     document = Document.objects.get(id=document_id) | ||||||
|  |     Document.objects.filter(pk=document_id).update(in_process=True) | ||||||
|  |  | ||||||
|     mime_type = document.mime_type |     mime_type = document.mime_type | ||||||
|  |  | ||||||
| @@ -349,6 +350,7 @@ def update_document_content_maybe_archive_file(document_id): | |||||||
|         ) |         ) | ||||||
|     finally: |     finally: | ||||||
|         parser.cleanup() |         parser.cleanup() | ||||||
|  |         Document.objects.filter(pk=document_id).update(in_process=False) | ||||||
|  |  | ||||||
|  |  | ||||||
| @shared_task | @shared_task | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon