1
0
mirror of https://pagure.io/fedora-qa/createhdds.git synced 2024-11-21 15:03:07 +00:00

report_job_results: handle cancelled jobs

Summary:
Cancelled jobs have their own state (at least in the openQA
running on happyassassin, they do). This causes r_j_r to get
stuck forever if any of the jobs are cancelled. Consider a
cancelled job 'done'.

Test Plan:
Try submitting results for a set of jobs that includes one or
more cancelled jobs. It should now work (before it would get
stuck).

Reviewers: jskladan, garretraziel

Reviewed By: garretraziel

Subscribers: tflink

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D492
This commit is contained in:
Adam Williamson 2015-08-10 11:10:57 -07:00
parent 3755fca412
commit 5c9d7142d5

View File

@ -25,7 +25,7 @@ def get_passed_testcases(job_ids, client):
for job_id, url in running_jobs.items():
output = client.openqa_request('GET', url)
job_state = output['job']
if job_state['state'] == 'done':
if job_state['state'] in ('done', 'cancelled'):
logger.info("job %s is done", job_id)
finished_jobs[job_id] = job_state
del running_jobs[job_id]