Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 97623ec2 authored by CAMPION Sebastien's avatar CAMPION Sebastien
Browse files

fix job status

parent aab45a96
No related branches found
No related tags found
No related merge requests found
......@@ -68,11 +68,12 @@ class App:
r.raise_for_status()
results = r.json()
status = results['status']
if status == 'in progress': # 'in progress', 'done', 'error', 'timeout'
log.info("wait for job %s", jobid)
if status in ['created', 'waiting', 'running', 'in progress']:
log.info("wait for job %s in status", jobid, status)
time.sleep(2)
else:
break
if status != 'done':
raise Exception('Job %s failed with status %s', (jobid, status))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment