def run(self):
if hasattr(self.service, 'name'):
name = self.service.name
else:
name = self.service.__class__.__name__
self.log.debug("running ServiceThread '%s'" % name)
self.name = name
if trace:
sys.settrace(trace)
try:
self.service.run()
except Exception:
exc_info = sys.exc_info()
backtrace = '\n'.join(traceback.format_exception(*(exc_info or sys.exc_info())))
self.log.error("Exception in main loop. backtrace: %s" % backtrace)
os._exit(-1)
评论列表
文章目录