From 6bb01dff5cf403419f5467aa97d42d8e5f81d560 Mon Sep 17 00:00:00 2001 From: agrant3 Date: Wed, 23 Oct 2024 17:27:18 +0100 Subject: [PATCH] AG: additional fix --- src/jupyter_remote/remote.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jupyter_remote/remote.py b/src/jupyter_remote/remote.py index d033ae5..6070416 100644 --- a/src/jupyter_remote/remote.py +++ b/src/jupyter_remote/remote.py @@ -88,15 +88,15 @@ def wait_for_pod(v1, name, ns, max_wait=60): def wait_for_job(v1, name, ns, max_wait=60): resp = v1.read_namespaced_job(name=name, namespace=ns) print(resp.status) - active_status = resp.status.active - ready_status = resp.status.ready + active_status = resp.status.active if resp.status.active else 0 + ready_status = resp.status.ready if resp.status.ready else 0 i = 0 while active_status+ready_status != 2 and i < max_wait: print("Waiting...") time.sleep(1) resp = v1.read_namespaced_job(name=name, namespace=ns) - active_status = resp.status.active - ready_status = resp.status.ready + active_status = resp.status.active if resp.status.active else 0 + ready_status = resp.status.ready if resp.status.ready else 0 i += 1 for status_condition in resp.status.conditions: try: -- GitLab