protected function scalePool(Supervisor $supervisor, $pool, $workers)
    {
        $supervisor->pruneTerminatingProcesses();

        $poolProcesses = $pool->totalProcessCount();

        if (round($workers) > $poolProcesses &&
            $this->wouldNotExceedMaxProcesses($supervisor)) {
            $pool->scale($poolProcesses + 1);
        } elseif (round($workers) < $poolProcesses &&
                  $poolProcesses > $supervisor->options->minProcesses) {
            $pool->scale($poolProcesses - 1);
        }
    }
protected function scalePool(Supervisor $supervisor, $pool, $workers)
    {
        $supervisor->pruneTerminatingProcesses();

        $poolProcesses = $pool->totalProcessCount();

        if (round($workers) > $poolProcesses &&
            $this->wouldNotExceedMaxProcesses($supervisor)) {
            $pool->scale($poolProcesses + 1);
        } elseif (round($workers) < $poolProcesses &&
                  $poolProcesses > $supervisor->options->minProcesses) {
            $pool->scale($poolProcesses - 1);
        }
    }
protected function scalePool ( Supervisor $ supervisor , $ pool , $ workers ) { $ supervisor -> pruneTerminatingProcesses ( ) ; $ poolProcesses = $ pool -> totalProcessCount ( ) ; if ( round ( $ workers ) > $ poolProcesses && $ this -> wouldNotExceedMaxProcesses ( $ supervisor ) ) { $ pool -> scale ( $ poolProcesses + 1 ) ; } elseif ( round ( $ workers ) < $ poolProcesses && $ poolProcesses > $ supervisor -> options -> minProcesses ) { $ pool -> scale ( $ poolProcesses - 1 ) ; } }
Scale the given pool to the recommended number of workers.

@param  \Laravel\Horizon\Supervisor  $supervisor
@param  \Laravel\Horizon\ProcessPool  $pool
@param  float  $workers
@return void
Scale the given pool to the recommended number of workers .