Skip to content

Commit

Permalink
Merge pull request #627 from themsaid/autoscalingCeiling
Browse files Browse the repository at this point in the history
[3.0] Adjust auto scaling to always use the max processes
  • Loading branch information
taylorotwell authored Jul 2, 2019
2 parents dab98e6 + 051c9c7 commit 6b2e912
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AutoScaler.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ protected function scalePool(Supervisor $supervisor, $pool, $workers)

$poolProcesses = $pool->totalProcessCount();

if (round($workers) > $poolProcesses &&
if (ceil($workers) > $poolProcesses &&
$this->wouldNotExceedMaxProcesses($supervisor)) {
$pool->scale($poolProcesses + 1);
} elseif (round($workers) < $poolProcesses &&
} elseif (ceil($workers) < $poolProcesses &&
$poolProcesses > $supervisor->options->minProcesses) {
$pool->scale($poolProcesses - 1);
}
Expand Down

0 comments on commit 6b2e912

Please sign in to comment.