mirror of https://github.com/CIRCL/AIL-framework
chg: [modules] set log level to critcal on unexpected errors
parent
77a708845c
commit
dca806963c
|
@ -65,7 +65,7 @@ class AbstractModule(ABC):
|
||||||
if message is None:
|
if message is None:
|
||||||
self.computeNone()
|
self.computeNone()
|
||||||
# Wait before next process
|
# 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)
|
time.sleep(self.pending_seconds)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class AbstractModule(ABC):
|
||||||
# Module processing with the message from the queue
|
# Module processing with the message from the queue
|
||||||
self.compute(message)
|
self.compute(message)
|
||||||
except Exception as err:
|
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):
|
def _module_name(self):
|
||||||
|
|
Loading…
Reference in New Issue