Abstract Class yii\queue\cli\Command
Inheritance | yii\queue\cli\Command » yii\console\Controller |
---|---|
Subclasses | yii\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
Property | Type | Description | Defined 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 |
Public Methods
Method | Description | Defined By |
---|---|---|
actionExec() | Executes a job. | yii\queue\cli\Command |
beforeAction() | yii\queue\cli\Command | |
optionAliases() | yii\queue\cli\Command | |
options() | yii\queue\cli\Command |
Protected Methods
Method | Description | Defined By |
---|---|---|
canIsolate() | yii\queue\cli\Command | |
canVerbose() | yii\queue\cli\Command | |
handleMessage() | Handles message using child process. | yii\queue\cli\Command |
isWorkerAction() | yii\queue\cli\Command |
Property Details
Isolate mode. It executes a job in a child process.
Verbose mode of a job execute. If enabled, execute result of each job will be printed.
Additional options to the verbose behavior.
Method Details
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 |
---|
public void beforeAction ( $action ) | ||
$action |
protected boolean canIsolate ( $actionID ) | ||
$actionID | string |
protected boolean canVerbose ( $actionID ) | ||
$actionID | string |
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 |
---|
protected abstract boolean isWorkerAction ( $actionID ) | ||
$actionID | string |
public void optionAliases ( ) |
public void options ( $actionID ) | ||
$actionID |