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