Class yii\queue\redis\Command

Inheritanceyii\queue\redis\Command » yii\queue\cli\Command » yii\console\Controller

Manages application redis-queue.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined 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

Property Details

$defaultAction public property
public string $defaultAction 'info'
$queue public property

Method Details

actionClear() public method (available since version 2.0.1)

Clears the queue.

public void actionClear ( )
actionListen() public method

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.

actionRemove() public method (available since version 2.0.1)

Removes a job by id.

public integer actionRemove ( $id )
$id integer
return integer

Exit code

actionRun() public method

Runs all jobs from redis-queue.

It can be used as cron job.

public null|integer actionRun ( )
return null|integer

Exit code.

actions() public method

public void actions ( )
isWorkerAction() protected method

protected boolean isWorkerAction ( $actionID )
$actionID string