Skip to content

Commit

Permalink
Fix autoscaler scaling down below zero when number of queues times mi…
Browse files Browse the repository at this point in the history
…nProcesses is higher than maxProcesses (#1292)
  • Loading branch information
PrinsFrank committed Jun 30, 2023
1 parent ea1ff82 commit b14498a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AutoScaler.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ protected function scalePool(Supervisor $supervisor, $pool, $workers)
$pool->scale(
min(
$totalProcessCount + $maxUpShift,
$supervisor->options->maxProcesses - (($supervisor->processPools->count() - 1) * $supervisor->options->minProcesses),
max($supervisor->options->minProcesses, $supervisor->options->maxProcesses - (($supervisor->processPools->count() - 1) * $supervisor->options->minProcesses)),
$desiredProcessCount
)
);
Expand Down

0 comments on commit b14498a

Please sign in to comment.