Class yii\queue\file\Command
Inheritance | yii\queue\file\Command » yii\queue\cli\Command » yii\console\Controller |
---|
Manages application file-queue.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$defaultAction | string | yii\queue\file\Command | |
$isolate | boolean | Isolate mode. | yii\queue\cli\Command |
$queue | yii\queue\file\Queue | yii\queue\file\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 |
---|---|---|
actionClear() | Clears the queue. | yii\queue\file\Command |
actionExec() | Executes a job. | yii\queue\cli\Command |
actionListen() | Listens file-queue and runs new jobs. | yii\queue\file\Command |
actionRemove() | Removes a job by id. | yii\queue\file\Command |
actionRun() | Runs all jobs from file-queue. | yii\queue\file\Command |
actions() | yii\queue\file\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\file\Command |
Property Details
Method Details
Clears the queue.
public void actionClear ( ) |
Listens file-queue and runs new jobs.
It can be used as daemon process.
public null|integer actionListen ( $timeout = 3 ) | ||
$timeout | integer | Number of seconds to sleep before next reading of the queue. |
return | null|integer | Exit code. |
---|
Removes a job by id.
public integer actionRemove ( $id ) | ||
$id | integer | |
return | integer | Exit code |
---|
Runs all jobs from file-queue.
It can be used as cron job.
public null|integer actionRun ( ) | ||
return | null|integer | Exit code. |
---|
public void actions ( ) |
protected boolean isWorkerAction ( $actionID ) | ||
$actionID | string |