A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
force flush on temp file during consumption
Fabian Koller21c501de28f0
diff --git a/ansible/molecule/default/verify.yml b/ansible/molecule/default/verify.ymlindex 1b3a436ca..4d7e30f4d 100644--- a/ansible/molecule/default/verify.yml+++ b/ansible/molecule/default/verify.yml@@ -29,9 +29,9 @@document:content: "{{ content }}"filename: "{{ filename }}.txt"- mime_type: text/plainheaders:Authorization: 'Basic {{ (paperlessng_superuser_name + ":" + paperlessng_superuser_password) | b64encode }}'+ Content-Type: text/plainreturn_content: yesregister: post_documentfailed_when: "'OK' not in post_document.content"@@ -45,10 +45,6 @@register: logsfailed_when: "('Consuming ' + filename + '.txt') not in logs.content"- - name: sleep 5 seconds- pause:- seconds: 5-- name: verify uploaded document has been consumeduri:url: "http://{{ paperlessng_listen_address }}:{{ paperlessng_listen_port }}/api/logs/"diff --git a/src/documents/views.py b/src/documents/views.pyindex b99bf11c7..7aadba36d 100755--- a/src/documents/views.py+++ b/src/documents/views.py@@ -383,6 +383,7 @@ class PostDocumentView(APIView):dir=settings.SCRATCH_DIR,delete=False) as f:f.write(doc_data)+ f.flush()os.utime(f.name, times=(t, t))async_task("documents.tasks.consume_file",