def wait_for_job(manager, job_config, poll_time=DEFAULT_POLL_TIME): job_id = job_config.get('job_id') while True: status = manager.get_status(job_id) if is_job_done(status): break time.sleep(poll_time)
def full_status(manager, job_status, job_id): if status.is_job_done(job_status): full_status = __job_complete_dict(job_status, manager, job_id) else: full_status = { "complete": "false", "status": job_status, "job_id": job_id } return full_status
def full_status(manager, job_status, job_id): if status.is_job_done(job_status): full_status = __job_complete_dict(job_status, manager, job_id) else: full_status = {"complete": "false", "status": job_status, "job_id": job_id} return full_status