Skip to content

Commit

Permalink
fix(python-client): improve get_job_status for running jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Oct 16, 2024
1 parent 20e8be1 commit a8c4ea2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions python-client/wmill/wmill/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,7 @@ def get_job_status(self, job_id: str) -> JobStatus:
assert job_type, f"{job} is not a valid job"
if job_type.lower() == "completedjob":
return "COMPLETED"
additional_properties = job.get("additional_properties", {})
if "running" not in additional_properties:
raise Exception(f"{job_id} is not running")
if additional_properties.get("running"):
if job.get("running"):
return "RUNNING"
return "WAITING"

Expand Down

0 comments on commit a8c4ea2

Please sign in to comment.