class Supervisor implements Pausable, Restartable, Terminable

Traits

Properties

protected array $pendingSignals

The pending signals that need to be processed.

from  ListensForSignals
string $name

The name of this supervisor instance.

ProcessPool> $processPools

All of the process pools being managed.

bool $working

Indicates if the Supervisor processes are working.

CarbonImmutable|null $lastAutoScaled

The time at which auto-scaling last ran for this supervisor.

Closure|null $output

The output handler.

protected int|null $exitStatus

The terminal exit status for this supervisor.

Methods

void
listenForSignals()

Listen for incoming process signals.

void
processPendingSignals()

Process the pending signals.

__construct(SupervisorOptions $options)

Create a new supervisor instance.

createProcessPools()

Create the supervisor's process pools.

createProcessPoolPerQueue()

Create a process pool for each queue.

createSingleProcessPool()

Create a single process pool.

createProcessPool(SupervisorOptions $options)

Create a new process pool with the given options.

void
scale(int $processes)

Scale the process count.

void
balance(array $balance)

Balance the process pool at the given scales.

__call($method, $arguments)

No description

Details

in ListensForSignals at line 26
protected void listenForSignals()

Listen for incoming process signals.

Return Value

void

in ListensForSignals at line 54
protected void processPendingSignals()

Process the pending signals.

Return Value

void

at line 62
__construct(SupervisorOptions $options)

Create a new supervisor instance.

Parameters

SupervisorOptions $options

the SupervisorOptions that should be utilized

at line 77
Collection createProcessPools()

Create the supervisor's process pools.

Return Value

Collection

at line 87
protected Collection createProcessPoolPerQueue()

Create a process pool for each queue.

Return Value

Collection

at line 97
protected Collection createSingleProcessPool()

Create a single process pool.

Return Value

Collection

at line 105
protected ProcessPool createProcessPool(SupervisorOptions $options)

Create a new process pool with the given options.

Parameters

SupervisorOptions $options

Return Value

ProcessPool

at line 115
void scale(int $processes)

Scale the process count.

Parameters

int $processes

Return Value

void

at line 131
void balance(array $balance)

Balance the process pool at the given scales.

Parameters

array $balance

Return Value

void

at line 137
__call($method, $arguments)

No description

Parameters

$method
$arguments