From e686979e55c99f03c4e3e40a2288a4e867fb358b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 30 Nov 2008 18:53:58 +0000 Subject: [PATCH] * Queue runner: don't start scheduled builds builds if they belong to a disabled project. Idem for the queue page. --- src/Hydra/root/common.tt | 2 +- src/Hydra/root/queue.tt | 4 +++- src/Hydra/root/static/css/hydra.css | 6 +++++- src/Hydra/script/hydra_queue_runner.pl | 8 ++++---- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Hydra/root/common.tt b/src/Hydra/root/common.tt index f820822a..2df6869e 100644 --- a/src/Hydra/root/common.tt +++ b/src/Hydra/root/common.tt @@ -38,7 +38,7 @@ [% FOREACH build IN builds -%] - [% IF !hideResultInfo %] diff --git a/src/Hydra/root/queue.tt b/src/Hydra/root/queue.tt index 9ddf67df..0aae040a 100644 --- a/src/Hydra/root/queue.tt +++ b/src/Hydra/root/queue.tt @@ -9,7 +9,9 @@ [% ELSE %] -

Note: jobs in red are currently executing.

+

Note: Builds in red are + currently executing. Builds in grey are currently disabled.

[% PROCESS renderBuildList builds=queue showSchedulingInfo=1 hideResultInfo=1 %] diff --git a/src/Hydra/root/static/css/hydra.css b/src/Hydra/root/static/css/hydra.css index bca34d9c..672a4bad 100644 --- a/src/Hydra/root/static/css/hydra.css +++ b/src/Hydra/root/static/css/hydra.css @@ -172,11 +172,15 @@ ul.productList li { margin-top: 1em; } -.runningJob { +.runningBuild { background-color: #ff3030; color: white; } +.disabledBuild { + background-color: #b0b0b0; +} + .productDetails { display: none; margin-top: 1em; diff --git a/src/Hydra/script/hydra_queue_runner.pl b/src/Hydra/script/hydra_queue_runner.pl index fb67e688..6e302085 100755 --- a/src/Hydra/script/hydra_queue_runner.pl +++ b/src/Hydra/script/hydra_queue_runner.pl @@ -58,8 +58,8 @@ sub checkBuilds { # Get the system types for the runnable builds. my @systemTypes = $db->resultset('Builds')->search( - {finished => 0, busy => 0}, - {join => 'schedulingInfo', select => [{distinct => 'system'}], as => ['system']}); + { finished => 0, busy => 0, enabled => 1, disabled => 0 }, + { join => ['schedulingInfo', 'project'], select => [{distinct => 'system'}], as => ['system'] }); # For each system type, select up to the maximum number of # concurrent build for that system type. Choose the highest @@ -79,8 +79,8 @@ sub checkBuilds { # Select the highest-priority builds to start. my @builds = $extraAllowed == 0 ? () : $db->resultset('Builds')->search( - { finished => 0, busy => 0, system => $system->system }, - { join => 'schedulingInfo', order_by => ["priority DESC", "timestamp"], + { finished => 0, busy => 0, system => $system->system, enabled => 1, disabled => 0 }, + { join => ['schedulingInfo', 'project'], order_by => ["priority DESC", "timestamp"], rows => $extraAllowed }); print "system type `", $system->system,