From 97623ec2c0c3fd006c24a02a17d54907de189335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81bastien=20Campion?= <sebastien.campion@inria.fr> Date: Wed, 4 Jul 2018 10:46:23 +0200 Subject: [PATCH] fix job status --- allgo/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/allgo/__init__.py b/allgo/__init__.py index b8e3475..f5ac6fd 100644 --- a/allgo/__init__.py +++ b/allgo/__init__.py @@ -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)) -- GitLab