Skip to content

Commit

Permalink
Remain in pending state until uri is available
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Mendoza committed Nov 14, 2024
1 parent d5064be commit 8d5120d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions batchspawner/batchspawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,15 +994,15 @@ 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):
if not self.job_status:
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)
Expand Down

0 comments on commit 8d5120d

Please sign in to comment.