Add timeout (function blocks space)

#84
by doevent - opened
def wait(self, job):
        job_result = job
        start_wait = time.time()
        while job_result['status'] not in ['succeeded', 'failed']:
            if int(time.time() - start_wait) > 60:
                raise Exception(f"Timeout error: {job_result['status']}")
            time.sleep(0.25)
            job_result = self.get_job(job['job'])

        return job_result
doevent changed pull request title from Add timeout to Add timeout (function blocks space)
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment