Skip to content

Commit

Permalink
not any not -> all
Browse files Browse the repository at this point in the history
  • Loading branch information
almahmoud committed Jul 30, 2024
1 parent 090b29f commit e83aa79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/jobs/runners/util/pykube_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def find_pod_object_by_name(pykube_api, job_name, namespace=None):


def is_pod_running(pykube_api, pod, namespace=None):
is_running = not any(
c.get("state", {}).get("running", {}).get("startedAt", False) == False
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:
Expand Down

0 comments on commit e83aa79

Please sign in to comment.