class Worker (View source)
void | __construct( QueueManager $manager, FailedJobProviderInterface $failer = null, Dispatcher $events = null) Create a new queue worker. | |
array | daemon( string $connectionName, string $queue = null, int $delay, int $memory = 128, int $sleep = 3, int $maxTries) Listen to the given queue in a loop. | |
array | pop( string $connectionName, string $queue = null, int $delay, int $sleep = 3, int $maxTries) Listen to the given queue. | |
array|null | process( string $connection, Job $job, int $maxTries, int $delay) Process a given job from the queue. | |
bool | memoryExceeded( int $memoryLimit) Determine if the memory limit has been exceeded. | |
void | stop() Stop listening and bail out of the script. | |
void | sleep( int $seconds) Sleep the script for a given number of seconds. | |
void | setDaemonExceptionHandler( ExceptionHandler $handler) Set the exception handler to use in Daemon mode. | |
void | setCache( Repository $cache) Set the cache repository implementation. | |
QueueManager | getManager() Get the queue manager instance. | |
void | setManager( QueueManager $manager) Set the queue manager instance. |
Create a new queue worker.
Listen to the given queue in a loop.
Listen to the given queue.
Process a given job from the queue.
Determine if the memory limit has been exceeded.
Stop listening and bail out of the script.
Sleep the script for a given number of seconds.
Set the exception handler to use in Daemon mode.
Set the cache repository implementation.
Get the queue manager instance.
Set the queue manager instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Queue/Worker.html