Commit 73d935b9 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Re-setup infrastructure after worker lost. #278

parent 45facd26
Pipeline #68968 passed with stages
in 17 minutes and 34 seconds
......@@ -55,7 +55,6 @@ def setup():
Will create client instances for the databases and has to be called before they
can be used.
"""
global elastic_client
setup_logging()
setup_mongo()
setup_elastic()
......
......@@ -461,6 +461,9 @@ class NomadCeleryRequest(Request):
def on_failure(self, exc_info, send_failed_event=True, return_ok=False):
if isinstance(exc_info.exception, WorkerLostError):
infrastructure.setup()
utils.get_logger(__name__).error(
'detected WorkerLostError', exc_info=exc_info.exception)
self._fail(
'task failed due to worker lost: %s' % str(exc_info.exception),
exc_info=exc_info)
......
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