Merge pull request #12749 from shanemcd/not-so-aggressive

Make error handling less aggressive when checking status of dispatcher task
This commit is contained in:
Shane McDonald 2022-08-29 11:50:56 -04:00 committed by GitHub
commit 696f099940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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