This commit is contained in:
Shea Levy 2013-03-07 10:52:31 -05:00
parent 6d131719be
commit 152c392198

View file

@ -100,7 +100,7 @@ sub checkBuilds {
{finished => 0, busy => 1, system => $system->system})->count; {finished => 0, busy => 1, system => $system->system})->count;
(my $systemTypeInfo) = $db->resultset('SystemTypes')->search({system => $system->system}); (my $systemTypeInfo) = $db->resultset('SystemTypes')->search({system => $system->system});
my $max = defined $systemTypeInfo ? $systemTypeInfo->maxconcurrent : $maxConcurrent{$system} // 2; my $max = defined $systemTypeInfo ? $systemTypeInfo->maxconcurrent : $maxConcurrent{$system->system} // 2;
my $extraAllowed = $max - $nrActive; my $extraAllowed = $max - $nrActive;
$extraAllowed = 0 if $extraAllowed < 0; $extraAllowed = 0 if $extraAllowed < 0;