From ceec2f075efa178ee1a43dc8414d5f9b8de30664 Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Tue, 30 Jul 2024 13:59:29 -0400 Subject: [PATCH] Check only phase --- lib/galaxy/jobs/runners/util/pykube_util.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/galaxy/jobs/runners/util/pykube_util.py b/lib/galaxy/jobs/runners/util/pykube_util.py index 0c4861bf22ae..b6122dd8aa00 100644 --- a/lib/galaxy/jobs/runners/util/pykube_util.py +++ b/lib/galaxy/jobs/runners/util/pykube_util.py @@ -95,11 +95,7 @@ def find_pod_object_by_name(pykube_api, job_name, namespace=None): def is_pod_running(pykube_api, pod, namespace=None): - is_running = all( - c.get("state", {}).get("running", {}).get("startedAt", False) - for c in pod.obj["status"].get("containerStatuses", []) - ) - if pod.obj["status"].get("phase") == "Running" and is_running: + if pod.obj["status"].get("phase") == "Running": return True return False