From e07128a1451b3f2c2207d6ad2f031a18c3df1113 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Mon, 4 Jan 2021 00:03:31 +0100 Subject: [PATCH] don't run post-consume script inside transaction #259 --- src/documents/consumer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/documents/consumer.py b/src/documents/consumer.py index 480537279..134137e2f 100755 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -252,8 +252,6 @@ class Consumer(LoggingMixin): self.log("debug", "Deleting file {}".format(self.path)) os.unlink(self.path) - self.run_post_consume_script(document) - except Exception as e: self.log( "error", @@ -264,6 +262,8 @@ class Consumer(LoggingMixin): finally: document_parser.cleanup() + self.run_post_consume_script(document) + self.log( "info", "Document {} consumption finished".format(document)