Commit c0381e5c authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix: prevent scheduling a negative number of Workers

parent 4d5985df
......@@ -90,6 +90,8 @@ sub preliminary_offer {
if( defined($available_capacity) and defined($multiplier) and ($multiplier >= 0.0) ) { # if multiplier is negative it is not limiting
$available_capacity = 0 if($available_capacity<0);
my $product = $available_capacity * $multiplier;
my $slots_available = int( "$product" ); # stringification helps to round up things like 0.1*10 (instead of leaving them at 0.99999999)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment