From dca806963c6647d7bea4507e5870ae2826042303 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 2 Apr 2021 16:41:11 +0200 Subject: [PATCH] chg: [modules] set log level to critcal on unexpected errors --- bin/module/abstract_module.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/module/abstract_module.py b/bin/module/abstract_module.py index aafe28a6..7c853af6 100644 --- a/bin/module/abstract_module.py +++ b/bin/module/abstract_module.py @@ -56,16 +56,16 @@ class AbstractModule(ABC): """ Run Module endless process """ - + # Endless loop processing messages from the input queue while self.proceed: # Get one message (paste) from the QueueIn (copy of Redis_Global publish) message = self.process.get_from_set() - + if message is None: self.computeNone() # Wait before next process - self.redis_logger.debug('%s, waiting for new message, Idling %ds'%(self.module_name, self.pending_seconds)) + self.redis_logger.debug(f"{self.module_name}, waiting for new message, Idling {self.pending_seconds}s") time.sleep(self.pending_seconds) continue @@ -73,7 +73,7 @@ class AbstractModule(ABC): # Module processing with the message from the queue self.compute(message) except Exception as err: - self.redis_logger.error("Error in module %s: %s"%(self.module_name, err)) + self.redis_logger.critical(f"Error in module {self.module_name}: {err}") def _module_name(self):