there is chance that we will have 404 when accessing a job's URI.
Signed-off-by: Kefu Chai <kchai@redhat.com>
url = os.path.join(config.results_server, 'runs', name, 'jobs', job_id,
'')
resp = requests.get(url)
+ if not resp.ok:
+ return False
job_info = resp.json()
if job_info['status'] in ('running', 'waiting'):
cache.add(description)
if node_job_is_active(node, active_jobs):
continue
result.append(node)
- return result
\ No newline at end of file
+ return result