Documentation

StartQueueWorkers extends Command
in package

Table of Contents

Properties

$description  : string
The console command description.
$signature  : string
The name and signature of the console command.

Methods

handle()  : int
Execute the console command.
buildQueueCommand()  : array<string|int, mixed>
Build the queue:work command array with options.
startBackgroundWorker()  : void
Start a queue worker in the background.

Properties

$description

The console command description.

protected string $description = 'Start a specified number of queue workers'

$signature

The name and signature of the console command.

protected string $signature = 'queue:multiple {workers=1 : The number of queue workers to start} {--connection= : The queue connection to use} {--queue= : The queue to process} {--tries= : The number of times to attempt a job before logging it as failed} {--timeout= : The number of seconds a child process can run} {--max-jobs= : The number of jobs to process before stopping} {--max-time= : The maximum number of seconds the worker should run} {--sleep= : Number of seconds to sleep when no job is available} {--backoff= : The number of seconds to wait before retrying a job that encountered an uncaught exception} {--force : Force the worker to run even in maintenance mode} {--once : Process only the next job on the queue} {--background : Run workers in the background and detach from terminal}'

Methods

handle()

Execute the console command.

public handle() : int
Return values
int

buildQueueCommand()

Build the queue:work command array with options.

protected buildQueueCommand() : array<string|int, mixed>
Return values
array<string|int, mixed>

startBackgroundWorker()

Start a queue worker in the background.

protected startBackgroundWorker(array<string|int, mixed> $command, int $workerNumber) : void
Parameters
$command : array<string|int, mixed>
$workerNumber : int

        
On this page

Search results