Skip to content
Snippets Groups Projects
Verified Commit 18a39279 authored by Daniel Göbel's avatar Daniel Göbel
Browse files

Fix typo in job monitoring logic

#55
parent 1c86328a
No related branches found
No related tags found
No related merge requests found
...@@ -97,6 +97,7 @@ class SlurmClient: ...@@ -97,6 +97,7 @@ class SlurmClient:
if response.status_code != status.HTTP_200_OK: if response.status_code != status.HTTP_200_OK:
return True return True
try: try:
return response.json()["job"][0]["job_state"] == "COMPLETED" job_state = response.json()["jobs"][0]["job_state"]
return job_state == "COMPLETED" or job_state == "FAILED"
except (KeyError, IndexError): except (KeyError, IndexError):
return True return True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment