Skip to content

Commit

Permalink
Check only phase
Browse files Browse the repository at this point in the history
  • Loading branch information
almahmoud committed Jul 30, 2024
1 parent e83aa79 commit ceec2f0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/galaxy/jobs/runners/util/pykube_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ceec2f0

Please sign in to comment.