From 9126f5b29cc105e60b88bcd74d5a78adf4de4c6a Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 1 Nov 2017 14:34:16 +0000 Subject: [PATCH] jobqueue: Fix creating test jobs Signed-off-by: Michael Tremer --- src/buildservice/jobqueue.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/buildservice/jobqueue.py b/src/buildservice/jobqueue.py index 743f5f9f..eb1dbcab 100644 --- a/src/buildservice/jobqueue.py +++ b/src/buildservice/jobqueue.py @@ -66,16 +66,16 @@ class JobQueue(base.Object): LEFT JOIN jobs ON builds.id = jobs.build_id \ WHERE builds.type = %s AND builds.state = ANY(%s) AND jobs.state = %s \ AND NOT EXISTS (SELECT 1 FROM jobs test_jobs \ - WHERE test_jobs.build_id = builds.id AND jobs.type = %s \ + WHERE test_jobs.build_id = builds.id AND jobs.test IS %s \ AND (test_jobs.state <> %s OR test_jobs.state = %s AND test_jobs.time_finished >= %s)) LIMIT %s", - "release", ["stable", "testing"], "finished", "test", "finished", "finished", threshold, limit) + "release", ["stable", "testing"], "finished", True, "finished", "finished", threshold, limit) # Search for the job with the right architecture in each # build and schedule a test job. for build in builds: for job in build: if job.arch == arch: - job.schedule("test") + job.restart() break def check_build_dependencies(self): -- 2.47.2