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 56
WorkerProcess
start(Closure $callback)
Start the process.
in
WorkerProcess at line 93
void
pause()
Pause the worker process.
in
WorkerProcess at line 101
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 121
protected void
restart()
Restart the process.
in
WorkerProcess at line 138
void
terminate()
Terminate the underlying process.
in
WorkerProcess at line 146
void
stop()
Stop the underlying process.
in
WorkerProcess at line 156
void
kill()
Stop the underlying process immediately.
in
WorkerProcess at line 166
protected void
sendSignal(int $signal)
Send a POSIX signal to the process.
in
WorkerProcess at line 180
protected void
cooldown()
Begin the cool-down period for the process.
in
WorkerProcess at line 207
bool
coolingDown()
Determine if the process is cooling down from a failed restart.
in
WorkerProcess at line 216
WorkerProcess
handleOutputUsing(Closure $callback)
Set the output handler.
in
WorkerProcess at line 226
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".