From 051c9c7ae555c8730e4dd0199be42d69fb39dd44 Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Tue, 2 Jul 2019 13:12:07 +0200 Subject: [PATCH] adjust auto scaling to always use the max processes and fix --- src/AutoScaler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AutoScaler.php b/src/AutoScaler.php index 09b42961..7c3be16e 100644 --- a/src/AutoScaler.php +++ b/src/AutoScaler.php @@ -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); }