Commit d042f92c authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed bad exception within process controller.


Former-commit-id: 8f26cae3
Former-commit-id: 35118d3d
parent 11f940f3
...@@ -353,6 +353,7 @@ class process_controller(object): ...@@ -353,6 +353,7 @@ class process_controller(object):
signal.signal(signal.SIGINT, self.stop) # enable clean shutdown possibility signal.signal(signal.SIGINT, self.stop) # enable clean shutdown possibility
# noinspection PyBroadException
try: try:
if self.job.profiling: if self.job.profiling:
from pyinstrument import Profiler from pyinstrument import Profiler
...@@ -401,19 +402,19 @@ class process_controller(object): ...@@ -401,19 +402,19 @@ class process_controller(object):
shutdown_loggers() shutdown_loggers()
except Exception as e: except:
if self.job.profiling: if self.job.profiling:
self.profiler.stop() self.profiler.stop()
print(self.profiler.output_text(unicode=True, color=True)) print(self.profiler.output_text(unicode=True, color=True))
self.job.status = 'failed' self.job.status = 'failed'
self.update_DB_job_record() self.update_DB_job_record()
self.logger.error('Execution failed with an error:', e)
if not self.job.disable_exception_handler: if not self.job.disable_exception_handler:
self.logger.error(e) self.logger.error('Execution failed with an error:', exc_info=True)
shutdown_loggers() shutdown_loggers()
else: else:
self.logger.error('Execution failed with an error:')
shutdown_loggers() shutdown_loggers()
raise raise
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment