from .sentry import get_client as get_sentry_client
from .misc import get_http_log_path
from .config import config as teuth_config
+from .exceptions import ConnectionLostError
from copy import deepcopy
log = logging.getLogger(__name__)
stack.append((taskname, manager))
except BaseException as e:
ctx.summary['success'] = False
+ if isinstance(e, ConnectionLostError):
+ # Prevent connection issues being flagged as failures
+ ctx.summary['status'] = 'dead'
if 'failure_reason' not in ctx.summary:
ctx.summary['failure_reason'] = str(e)
log.exception('Saw exception from tasks.')
suppress = manager.__exit__(*exc_info)
except Exception as e:
ctx.summary['success'] = False
+ if isinstance(e, ConnectionLostError):
+ # Prevent connection issues being flagged as failures
+ ctx.summary['status'] = 'dead'
if 'failure_reason' not in ctx.summary:
ctx.summary['failure_reason'] = str(e)
log.exception('Manager failed: %s', taskname)