mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
fix: [abstract module] exception traceback #145
This commit is contained in:
parent
df4bb531d2
commit
512e61cadc
1 changed files with 2 additions and 2 deletions
|
@ -102,6 +102,7 @@ class AbstractModule(ABC):
|
||||||
self.compute(message)
|
self.compute(message)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
trace = traceback.format_tb(err.__traceback__)
|
trace = traceback.format_tb(err.__traceback__)
|
||||||
|
trace = ''.join(trace)
|
||||||
self.redis_logger.critical(f"Error in module {self.module_name}: {err}")
|
self.redis_logger.critical(f"Error in module {self.module_name}: {err}")
|
||||||
self.redis_logger.critical(f"Module {self.module_name} input message: {message}")
|
self.redis_logger.critical(f"Module {self.module_name} input message: {message}")
|
||||||
self.redis_logger.critical(trace)
|
self.redis_logger.critical(trace)
|
||||||
|
@ -109,8 +110,7 @@ class AbstractModule(ABC):
|
||||||
print(f"ERROR: {err}")
|
print(f"ERROR: {err}")
|
||||||
print(f'MESSAGE: {message}')
|
print(f'MESSAGE: {message}')
|
||||||
print('TRACEBACK:')
|
print('TRACEBACK:')
|
||||||
for line in trace:
|
print(trace)
|
||||||
print(line)
|
|
||||||
# remove from set_module
|
# remove from set_module
|
||||||
## check if item process == completed
|
## check if item process == completed
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue