diff --git a/launch_job.py b/launch_job.py index 1988299..3365e0a 100644 --- a/launch_job.py +++ b/launch_job.py @@ -37,7 +37,7 @@ def launch(self, templateid): response = requests.post(f"{self.towerurl}/job_templates/{templateid}/launch/", auth=self.towerauth) - sys.stderr.write(f"status code : {response.status_code}") + sys.stderr.write(f"status code : {response.status_code}\n") if response.status_code == 201: return json.loads(response.text).get("job", 0) sys.stderr.write(f"ERROR :\n{repr(response.text)}\n") @@ -54,7 +54,7 @@ def launch_with_vars(self, templateid, extra_vars_file): response = requests.post(f"{self.towerurl}/job_templates/{templateid}/launch/", auth=self.towerauth, json={"extra_vars":extra_vars_string} ) - sys.stderr.write(f"status code : {response.status_code}") + sys.stderr.write(f"status code : {response.status_code}\n") if response.status_code == 201: return json.loads(response.text).get("job", 0) sys.stderr.write(f"ERROR :\n{repr(response.text)}\n") @@ -78,6 +78,7 @@ def wait(self, jobid): return False if status in ("failed", "cancelled"): return True + sys.stderr.write(f"Check {step}/{maxsteps} : {status}\n") #else : # pass # ("pending", "waiting", "running") sys.stderr.write(f"ERROR : Tower Job #{jobid} was still running after {timeout} seconds\n")