Make error handling less aggressive when checking status of dispatcher task

This commit is contained in:
Shane McDonald 2022-08-26 09:05:38 -04:00
parent 4fbf5e9e2f
commit 457dd890cb

View File

@ -1406,9 +1406,10 @@ class UnifiedJob(
timeout = 5
try:
running = self.celery_task_id in ControlDispatcher('dispatcher', self.controller_node or self.execution_node).running(timeout=timeout)
except (socket.timeout, RuntimeError):
except socket.timeout:
logger.error('could not reach dispatcher on {} within {}s'.format(self.execution_node, timeout))
running = False
except Exception:
logger.exception("error encountered when checking task status")
return running
@property