From 457dd890cb4dacaac0b654c617fed0be363e3d8c Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Fri, 26 Aug 2022 09:05:38 -0400 Subject: [PATCH] Make error handling less aggressive when checking status of dispatcher task --- awx/main/models/unified_jobs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/main/models/unified_jobs.py b/awx/main/models/unified_jobs.py index d8d6936052..b49bcf0242 100644 --- a/awx/main/models/unified_jobs.py +++ b/awx/main/models/unified_jobs.py @@ -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