Skip to content

Commit

Permalink
fixing case when status is None (#3865)
Browse files Browse the repository at this point in the history
* fixing case when status is None

* Fixing status update
  • Loading branch information
goswamig committed May 29, 2020
1 parent 699ce93 commit 58ff65f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def compile_and_run_pipeline(

def wait_for_job_completion(client, run_id, timeout, status_to_check):
response = client.wait_for_run_completion(run_id, timeout)
status = response.run.status.lower() == status_to_check
status = None
if response.run.status:
status = response.run.status.lower() == status_to_check
return status


Expand All @@ -36,8 +38,9 @@ def wait_for_job_status(client, run_id, timeout, status_to_check="succeeded"):
else:
time.sleep(timeout)
response = client.get_run(run_id)
status = response.run.status.lower() == status_to_check

status = None
if response.run.status:
status = response.run.status.lower() == status_to_check
return status


Expand Down

0 comments on commit 58ff65f

Please sign in to comment.