From 8d5120d5da76c6cbc399a05e57f1f673aabffd79 Mon Sep 17 00:00:00 2001 From: Thomas Mendoza Date: Thu, 14 Nov 2024 11:45:58 -0800 Subject: [PATCH] Remain in pending state until uri is available --- batchspawner/batchspawner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/batchspawner/batchspawner.py b/batchspawner/batchspawner.py index d6aeff2..0b981d2 100644 --- a/batchspawner/batchspawner.py +++ b/batchspawner/batchspawner.py @@ -994,7 +994,7 @@ def state_ispending(self): return False status = json.loads(self.job_status) - return status["state"] in ("DEPEND", "PRIORITY", "SCHED") + return status["state"] in ("DEPEND", "PRIORITY", "SCHED") or "uri" not in status def state_isrunning(self): @@ -1002,7 +1002,7 @@ def state_isrunning(self): return False status = json.loads(self.job_status) - return status["state"] in ("RUN", "CLEANUP") + return status["state"] in ("RUN", "CLEANUP") and "uri" in status def state_gethost(self): status = json.loads(self.job_status)