Commit 2dee1484 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 f4a1fb8b
......@@ -353,6 +353,7 @@ class process_controller(object):
signal.signal(signal.SIGINT, self.stop) # enable clean shutdown possibility
# noinspection PyBroadException
try:
if self.job.profiling:
from pyinstrument import Profiler
......@@ -401,19 +402,19 @@ class process_controller(object):
shutdown_loggers()
except Exception as e:
except:
if self.job.profiling:
self.profiler.stop()
print(self.profiler.output_text(unicode=True, color=True))
self.job.status = 'failed'
self.update_DB_job_record()
self.logger.error('Execution failed with an error:', e)
if not self.job.disable_exception_handler:
self.logger.error(e)
self.logger.error('Execution failed with an error:', exc_info=True)
shutdown_loggers()
else:
self.logger.error('Execution failed with an error:')
shutdown_loggers()
raise
......
Markdown is supported
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