Class yii\queue\file\Command

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

Manages application file-queue.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined 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

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 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.

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 file-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