PHP Class Illuminate\Queue\Console\WorkCommand

Inheritance: extends Illuminate\Console\Command
Exibir arquivo Open project: illuminate/queue Class Usage Examples

Protected Properties

Property Type Description
$description string The console command description.
$signature string The console command name.
$worker Illuminate\Queue\Worker The queue worker instance.

Public Methods

Method Description
__construct ( Worker $worker ) : void Create a new queue listen command.
fire ( ) : void Execute the console command.

Protected Methods

Method Description
downForMaintenance ( ) : boolean Determine if the worker should run in maintenance mode.
gatherWorkerOptions ( ) : WorkerOptions Gather all of the queue worker options as a single object.
getQueue ( string $connection ) : string Get the queue name for the worker.
listenForEvents ( ) : void Listen for the queue events in order to update the console output.
logFailedJob ( Illuminate\Queue\Events\JobFailed $event ) : void Store a failed job event.
runWorker ( string $connection, string $queue ) : array Run the worker instance.
writeOutput ( Illuminate\Contracts\Queue\Job $job, boolean $failed ) : void Write the status output for the queue worker.

Method Details

__construct() public method

Create a new queue listen command.
public __construct ( Worker $worker ) : void
$worker Illuminate\Queue\Worker
return void

downForMaintenance() protected method

Determine if the worker should run in maintenance mode.
protected downForMaintenance ( ) : boolean
return boolean

fire() public method

Execute the console command.
public fire ( ) : void
return void

gatherWorkerOptions() protected method

Gather all of the queue worker options as a single object.
protected gatherWorkerOptions ( ) : WorkerOptions
return Illuminate\Queue\WorkerOptions

getQueue() protected method

Get the queue name for the worker.
protected getQueue ( string $connection ) : string
$connection string
return string

listenForEvents() protected method

Listen for the queue events in order to update the console output.
protected listenForEvents ( ) : void
return void

logFailedJob() protected method

Store a failed job event.
protected logFailedJob ( Illuminate\Queue\Events\JobFailed $event ) : void
$event Illuminate\Queue\Events\JobFailed
return void

runWorker() protected method

Run the worker instance.
protected runWorker ( string $connection, string $queue ) : array
$connection string
$queue string
return array

writeOutput() protected method

Write the status output for the queue worker.
protected writeOutput ( Illuminate\Contracts\Queue\Job $job, boolean $failed ) : void
$job Illuminate\Contracts\Queue\Job
$failed boolean
return void

Property Details

$description protected_oe property

The console command description.
protected string $description
return string

$signature protected_oe property

The console command name.
protected string $signature
return string

$worker protected_oe property

The queue worker instance.
protected Worker,Illuminate\Queue $worker
return Illuminate\Queue\Worker