W3cubDocs

/Laravel 5.4

Listener

class Listener (View source)

Methods

void __construct(string $commandPath)

Create a new queue listener.

void listen(string $connection, string $queue, ListenerOptions $options)

Listen to the given queue connection.

Process makeProcess(string $connection, string $queue, ListenerOptions $options)

Create a new Symfony process for the worker.

void runProcess(Process $process, int $memory)

Run the given process.

bool memoryExceeded(int $memoryLimit)

Determine if the memory limit has been exceeded.

void stop()

Stop listening and bail out of the script.

void setOutputHandler(Closure $outputHandler)

Set the output handler callback.

Details

void __construct(string $commandPath)

Create a new queue listener.

Parameters

string $commandPath

Return Value

void

void listen(string $connection, string $queue, ListenerOptions $options)

Listen to the given queue connection.

Parameters

string $connection
string $queue
ListenerOptions $options

Return Value

void

Process makeProcess(string $connection, string $queue, ListenerOptions $options)

Create a new Symfony process for the worker.

Parameters

string $connection
string $queue
ListenerOptions $options

Return Value

Process

void runProcess(Process $process, int $memory)

Run the given process.

Parameters

Process $process
int $memory

Return Value

void

bool memoryExceeded(int $memoryLimit)

Determine if the memory limit has been exceeded.

Parameters

int $memoryLimit

Return Value

bool

void stop()

Stop listening and bail out of the script.

Return Value

void

void setOutputHandler(Closure $outputHandler)

Set the output handler callback.

Parameters

Closure $outputHandler

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.4/Illuminate/Queue/Listener.html