From 1cf36468b125f2d3e6ad8dc3b50d90bf07a20f3c Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Tue, 16 Jul 2024 16:17:47 -0400 Subject: [PATCH] Reformat with black --- lib/galaxy/jobs/runners/kubernetes.py | 2 -- lib/galaxy/jobs/runners/util/pykube_util.py | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/jobs/runners/kubernetes.py b/lib/galaxy/jobs/runners/kubernetes.py index 6a30219d7892..f7e61c20e7d2 100644 --- a/lib/galaxy/jobs/runners/kubernetes.py +++ b/lib/galaxy/jobs/runners/kubernetes.py @@ -959,7 +959,6 @@ def __job_failed_due_to_low_memory(self, job_state): return False - def __check_job_pod_running(self, job_state): """ checks the state of the pod to see if it is unschedulable. @@ -971,7 +970,6 @@ def __check_job_pod_running(self, job_state): pod = Pod(self._pykube_api, pods.response["items"][0]) return is_pod_running(self._pykube_api, pod, self.runner_params["k8s_namespace"]) - def __job_pending_due_to_unschedulable_pod(self, job_state): """ checks the state of the pod to see if it is unschedulable. diff --git a/lib/galaxy/jobs/runners/util/pykube_util.py b/lib/galaxy/jobs/runners/util/pykube_util.py index b32982dd2dbc..1dde6a2771b2 100644 --- a/lib/galaxy/jobs/runners/util/pykube_util.py +++ b/lib/galaxy/jobs/runners/util/pykube_util.py @@ -95,7 +95,10 @@ 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 for c in pod.obj["status"].get("containerStatuses", [])) + is_running = not any( + c.get("state", {}).get("running", {}).get("startedAt", False) == False + for c in pod.obj["status"].get("containerStatuses", []) + ) if pod.obj["status"].get("phase") == "Running" and is_running: return True @@ -319,8 +322,7 @@ def galaxy_instance_id(params): "find_pod_object_by_name", "galaxy_instance_id", "HTTPError", - "is_pod_running" - "is_pod_unschedulable", + "is_pod_running" "is_pod_unschedulable", "Job", "Service", "Ingress",