SupervisorProcess
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
Create a new supervisor process instance.
Evaluate the current state of the process.
Determine if the process is cooling down from a failed restart.
Pass on method calls to the underlying process.
Re-provision this supervisor process based on the provisioning plan.
Terminate the supervisor with the given status.
Mark the process as "dead".
Details
at line 49
__construct(SupervisorOptions $options, Process $process, Closure|null $output = null)
Create a new supervisor process instance.
in
WorkerProcess at line 58
WorkerProcess
start(Closure $callback)
Start the process.
in
WorkerProcess at line 95
void
pause()
Pause the worker process.
in
WorkerProcess at line 103
void
continue()
Instruct the worker process to continue working.
at line 66
void
monitor()
Evaluate the current state of the process.
in
WorkerProcess at line 123
protected void
restart()
Restart the process.
in
WorkerProcess at line 140
void
terminate()
Terminate the underlying process.
in
WorkerProcess at line 148
void
stop()
Stop the underlying process.
in
WorkerProcess at line 158
void
kill()
Stop the underlying process immediately.
in
WorkerProcess at line 168
protected void
sendSignal(int $signal)
Send a POSIX signal to the process.
in
WorkerProcess at line 182
protected void
cooldown()
Begin the cool-down period for the process.
in
WorkerProcess at line 209
bool
coolingDown()
Determine if the process is cooling down from a failed restart.
in
WorkerProcess at line 220
WorkerProcess
handleOutputUsing(Closure $callback)
Set the output handler.
in
WorkerProcess at line 230
mixed
__call(string $method, array $parameters)
Pass on method calls to the underlying process.
at line 111
protected void
reprovision()
Re-provision this supervisor process based on the provisioning plan.
at line 125
void
terminateWithStatus(int $status)
Terminate the supervisor with the given status.
at line 137
protected void
markAsDead()
Mark the process as "dead".