Prevent a division by zero in hydra-queue-runner

Fixes #131.
This commit is contained in:
Eelco Dolstra 2013-11-06 11:59:04 +01:00
parent f1c187198c
commit ecadcef642

View file

@ -106,7 +106,7 @@ sub checkBuilds {
{ join => ['project'], select => ['system'], as => ['system'], distinct => 1 });
# Get the total number of scheduling shares.
my $totalShares = getTotalShares($db);
my $totalShares = getTotalShares($db) || 1;
# For each system type, select up to the maximum number of
# concurrent build for that system type.