A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
logging before executing pre and post consume scripts
jonaswinkler4b281ca89d70
diff --git a/src/documents/consumer.py b/src/documents/consumer.pyindex 3d7d98198..8c888259f 100755--- a/src/documents/consumer.py+++ b/src/documents/consumer.py@@ -115,6 +115,9 @@ class Consumer(LoggingMixin):f"Configured pre-consume script "f"{settings.PRE_CONSUME_SCRIPT} does not exist.")+ self.log("info",+ f"Executing pre-consume script {settings.PRE_CONSUME_SCRIPT}")+try:Popen((settings.PRE_CONSUME_SCRIPT, self.path)).wait()except Exception as e:@@ -135,6 +138,11 @@ class Consumer(LoggingMixin):f"{settings.POST_CONSUME_SCRIPT} does not exist.")+ self.log(+ "info",+ f"Executing post-consume script {settings.POST_CONSUME_SCRIPT}"+ )+try:Popen((settings.POST_CONSUME_SCRIPT,