class WorkerProcess mixin Process

Constants

protected STARTUP_SIGNALS

Signals handled by a queue worker after its application boots.

Properties

Closure|null $output

The output handler callback.

CarbonImmutable|null $restartAgainAt

The time at which the cooldown period will be over.

Methods

__construct(Process $process)

Create a new worker 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.

Details

at line 48
__construct(Process $process)

Create a new worker process instance.

Parameters

Process $process

the underlying Symfony process

at line 56
WorkerProcess start(Closure $callback)

Start the process.

Parameters

Closure $callback

Return Value

WorkerProcess

at line 93
void pause()

Pause the worker process.

Return Value

void

at line 101
void continue()

Instruct the worker process to continue working.

Return Value

void

at line 109
void monitor()

Evaluate the current state of the process.

Return Value

void

at line 121
protected void restart()

Restart the process.

Return Value

void

at line 138
void terminate()

Terminate the underlying process.

Return Value

void

at line 146
void stop()

Stop the underlying process.

Return Value

void

at line 156
void kill()

Stop the underlying process immediately.

Return Value

void

at line 166
protected void sendSignal(int $signal)

Send a POSIX signal to the process.

Parameters

int $signal

Return Value

void

at line 180
protected void cooldown()

Begin the cool-down period for the process.

Return Value

void

at line 207
bool coolingDown()

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

Return Value

bool

at line 216
WorkerProcess handleOutputUsing(Closure $callback)

Set the output handler.

Parameters

Closure $callback

Return Value

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