* Queue runner: don't start scheduled builds builds if they belong to

a disabled project.  Idem for the queue page.
This commit is contained in:
Eelco Dolstra 2008-11-30 18:53:58 +00:00
parent 4f2b47bb0e
commit e686979e55
4 changed files with 13 additions and 7 deletions

View file

@ -38,7 +38,7 @@
</thead> </thead>
<tbody> <tbody>
[% FOREACH build IN builds -%] [% FOREACH build IN builds -%]
<tr class="clickable [% IF build.schedulingInfo.busy %]runningJob[% END %]" <tr class="clickable [% IF build.schedulingInfo.busy %]runningBuild[% END %] [% IF build.schedulingInfo.disabled == 1 || build.project.enabled == 0 %]disabledBuild[% END %]"
onclick="window.location = '[% c.uri_for('/build' build.id) %]'"> onclick="window.location = '[% c.uri_for('/build' build.id) %]'">
[% IF !hideResultInfo %] [% IF !hideResultInfo %]
<td> <td>

View file

@ -9,7 +9,9 @@
[% ELSE %] [% ELSE %]
<p>Note: jobs in <span class="runningJob">red</span> are currently executing.</p> <p>Note: Builds in <span class="runningBuild">red</span> are
currently executing. Builds in <span
class="disabledBuild">grey</span> are currently disabled.</p>
[% PROCESS renderBuildList builds=queue showSchedulingInfo=1 hideResultInfo=1 %] [% PROCESS renderBuildList builds=queue showSchedulingInfo=1 hideResultInfo=1 %]

View file

@ -172,11 +172,15 @@ ul.productList li {
margin-top: 1em; margin-top: 1em;
} }
.runningJob { .runningBuild {
background-color: #ff3030; background-color: #ff3030;
color: white; color: white;
} }
.disabledBuild {
background-color: #b0b0b0;
}
.productDetails { .productDetails {
display: none; display: none;
margin-top: 1em; margin-top: 1em;

View file

@ -58,8 +58,8 @@ sub checkBuilds {
# Get the system types for the runnable builds. # Get the system types for the runnable builds.
my @systemTypes = $db->resultset('Builds')->search( my @systemTypes = $db->resultset('Builds')->search(
{finished => 0, busy => 0}, { finished => 0, busy => 0, enabled => 1, disabled => 0 },
{join => 'schedulingInfo', select => [{distinct => 'system'}], as => ['system']}); { join => ['schedulingInfo', 'project'], select => [{distinct => 'system'}], as => ['system'] });
# For each system type, select up to the maximum number of # For each system type, select up to the maximum number of
# concurrent build for that system type. Choose the highest # concurrent build for that system type. Choose the highest
@ -79,8 +79,8 @@ sub checkBuilds {
# Select the highest-priority builds to start. # Select the highest-priority builds to start.
my @builds = $extraAllowed == 0 ? () : $db->resultset('Builds')->search( my @builds = $extraAllowed == 0 ? () : $db->resultset('Builds')->search(
{ finished => 0, busy => 0, system => $system->system }, { finished => 0, busy => 0, system => $system->system, enabled => 1, disabled => 0 },
{ join => 'schedulingInfo', order_by => ["priority DESC", "timestamp"], { join => ['schedulingInfo', 'project'], order_by => ["priority DESC", "timestamp"],
rows => $extraAllowed }); rows => $extraAllowed });
print "system type `", $system->system, print "system type `", $system->system,