Abstract Class yii\queue\cli\Command

Inheritanceyii\queue\cli\Command » yii\console\Controller
Subclassesyii\queue\amqp\Command, yii\queue\amqp_interop\Command, yii\queue\beanstalk\Command, yii\queue\db\Command, yii\queue\file\Command, yii\queue\gearman\Command, yii\queue\redis\Command

Class Command

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$isolate boolean Isolate mode. yii\queue\cli\Command
$queue yii\queue\cli\Queue yii\queue\cli\Command
$verbose boolean Verbose mode of a job execute. yii\queue\cli\Command
$verboseConfig array Additional options to the verbose behavior. yii\queue\cli\Command

Property Details

$isolate public property

Isolate mode. It executes a job in a child process.

public boolean $isolate true
$queue public property
$verbose public property

Verbose mode of a job execute. If enabled, execute result of each job will be printed.

public boolean $verbose false
$verboseConfig public property (available since version 2.0.2)

Additional options to the verbose behavior.

public array $verboseConfig = ['class' => \yii\queue\cli\VerboseBehavior::class]

Method Details

actionExec() public method

Executes a job.

The command is internal, and used to isolate a job execution. Manual usage is not provided.

public integer actionExec ( $id, $ttr, $attempt, $pid )
$id string|null

Of a message

$ttr integer

Time to reserve

$attempt integer

Number

$pid integer

Of a worker

return integer

Exit code

beforeAction() public method

public void beforeAction ( $action )
$action
canIsolate() protected method

protected boolean canIsolate ( $actionID )
$actionID string
canVerbose() protected method

protected boolean canVerbose ( $actionID )
$actionID string
handleMessage() protected method

Handles message using child process.

See also actionExec().

protected boolean handleMessage ( $id, $message, $ttr, $attempt )
$id string|null

Of a message

$message string
$ttr integer

Time to reserve

$attempt integer

Number

throws
isWorkerAction() protected abstract method (available since version 2.0.2)

protected abstract boolean isWorkerAction ( $actionID )
$actionID string
optionAliases() public method

public void optionAliases ( )
options() public method

public void options ( $actionID )
$actionID