class SupervisorProcess extends WorkerProcess

Constants

protected STARTUP_SIGNALS

Signals handled by a supervisor after its application boots.

Properties

Closure|null $output

The output handler callback.

from  WorkerProcess
CarbonImmutable|null $restartAgainAt

The time at which the cooldown period will be over.

from  WorkerProcess
string $name

The name of the supervisor.

bool $dead

Indicates if the process is "dead".

array $dontRestartOn

The exit codes on which supervisor should be marked as dead.

Methods

__construct(SupervisorOptions $options, Process $process, Closure|null $output = null)

Create a new supervisor process instance.

start(Closure $callback)

Start the process.

void
pause()

Pause the worker process.

void
continue()

Instruct the worker process to continue working.

void
monitor()

Evaluate the current state of the process.

void
restart()

Restart the process.

void
terminate()

Terminate the underlying process.

void
stop()

Stop the underlying process.

void
kill()

Stop the underlying process immediately.

void
sendSignal(int $signal)

Send a POSIX signal to the process.

void
cooldown()

Begin the cool-down period for the process.

bool
coolingDown()

Determine if the process is cooling down from a failed restart.

handleOutputUsing(Closure $callback)

Set the output handler.

mixed
__call(string $method, array $parameters)

Pass on method calls to the underlying process.

void
reprovision()

Re-provision this supervisor process based on the provisioning plan.

void
terminateWithStatus(int $status)

Terminate the supervisor with the given status.

void
markAsDead()

Mark the process as "dead".

Details

at line 49
__construct(SupervisorOptions $options, Process $process, Closure|null $output = null)

Create a new supervisor process instance.

Parameters

SupervisorOptions $options
Process $process

the underlying Symfony process

Closure|null $output

in WorkerProcess at line 56
WorkerProcess start(Closure $callback)

Start the process.

Parameters

Closure $callback

Return Value

WorkerProcess

in WorkerProcess at line 93
void pause()

Pause the worker process.

Return Value

void

in WorkerProcess at line 101
void continue()

Instruct the worker process to continue working.

Return Value

void

at line 66
void monitor()

Evaluate the current state of the process.

Return Value

void

in WorkerProcess at line 121
protected void restart()

Restart the process.

Return Value

void

in WorkerProcess at line 138
void terminate()

Terminate the underlying process.

Return Value

void

in WorkerProcess at line 146
void stop()

Stop the underlying process.

Return Value

void

in WorkerProcess at line 156
void kill()

Stop the underlying process immediately.

Return Value

void

in WorkerProcess at line 166
protected void sendSignal(int $signal)

Send a POSIX signal to the process.

Parameters

int $signal

Return Value

void

in WorkerProcess at line 180
protected void cooldown()

Begin the cool-down period for the process.

Return Value

void

in WorkerProcess at line 207
bool coolingDown()

Determine if the process is cooling down from a failed restart.

Return Value

bool

in WorkerProcess at line 216
WorkerProcess handleOutputUsing(Closure $callback)

Set the output handler.

Parameters

Closure $callback

Return Value

WorkerProcess

in WorkerProcess at line 226
mixed __call(string $method, array $parameters)

Pass on method calls to the underlying process.

Parameters

string $method
array $parameters

Return Value

mixed

at line 111
protected void reprovision()

Re-provision this supervisor process based on the provisioning plan.

Return Value

void

at line 125
void terminateWithStatus(int $status)

Terminate the supervisor with the given status.

Parameters

int $status

Return Value

void

at line 137
protected void markAsDead()

Mark the process as "dead".

Return Value

void