From 53e65c00b517e38969e1fbbe8f2ea88b4cba0232 Mon Sep 17 00:00:00 2001 From: Martijn Vermaat <martijn@vermaat.name> Date: Thu, 12 Dec 2013 16:43:49 +0100 Subject: [PATCH] Do not catch any error in the batch processor but just crash instead We should leave process control to others, for example supervisord which can automatically restart crashed processes. --- mutalyzer/entrypoints/batch_processor.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/mutalyzer/entrypoints/batch_processor.py b/mutalyzer/entrypoints/batch_processor.py index 18cffd72..f9f3dde0 100644 --- a/mutalyzer/entrypoints/batch_processor.py +++ b/mutalyzer/entrypoints/batch_processor.py @@ -10,7 +10,6 @@ import argparse import signal import sys import time -import traceback from .. import config from .. import Db @@ -40,14 +39,7 @@ def process(): while not scheduler.stopped(): # Process batch jobs. This process() method runs while there # exist jobs to run. - try: - scheduler.process(counter) - except Exception as e: - f = open('/tmp/batcherror.log', 'a+') - f.write('Error (%s): %s\n' % (type(e), str(e))) - f.write('%s\n\n' % repr(traceback.format_exc())) - f.flush() - f.close() + scheduler.process(counter) if scheduler.stopped(): break # Wait a bit and process any possible new jobs. -- GitLab