From 02ef7cb0388970d894f85000563fe2249a967f9e Mon Sep 17 00:00:00 2001 From: Jonas Winkler Date: Wed, 11 Nov 2020 14:14:21 +0100 Subject: [PATCH] small consumer fixes --- src/documents/consumer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/documents/consumer.py b/src/documents/consumer.py index 75e6f6120..96aad7d49 100755 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -60,7 +60,6 @@ class Consumer: raise ConsumerError( "Consumption directory {} does not exist".format(self.consume)) - def log(self, level, message): getattr(self.logger, level)(message, extra={ "group": self.logging_group @@ -98,7 +97,6 @@ class Consumer: else: self.log("info", "Parser: {}".format(parser_class.__name__)) - document_consumption_started.send( sender=self.__class__, filename=doc, @@ -110,9 +108,10 @@ class Consumer: try: self.log("info", "Generating thumbnail for {}...".format(doc)) thumbnail = document_parser.get_optimised_thumbnail() + text = document_parser.get_text() date = document_parser.get_date() document = self._store( - document_parser.get_text(), + text, doc, thumbnail, date