Class craft\queue\Command
- Inheritance
- craft\queue\Command ยป yii\queue\cli\Command
- Available since version
- 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/queue/Command.php
Manages application db-queue.
Property | Type | Description | Defined By |
---|---|---|---|
$defaultAction |
string | craft\queue\Command | |
$queue |
craft\queue\Queue | craft\queue\Command | |
$verboseConfig |
craft\queue\Command |
Method | Description | Defined By |
---|---|---|
actionListen() |
Listens db-queue and runs new jobs. | craft\queue\Command |
actionRun() |
Runs all jobs from db-queue. | craft\queue\Command |
actions() |
craft\queue\Command | |
beforeAction() |
craft\queue\Command |
Method | Description | Defined By |
---|---|---|
isWorkerAction() |
craft\queue\Command |
Property Details
$defaultAction
public property
#
public string $defaultAction = 'info'
$queue
public property
#
public craft\queue\Queue $queue = null
$verboseConfig
public property
#
public $verboseConfig = ['class' => \craft\queue\VerboseBehavior::class]
Method Details
actionListen()
public method
#
Listens db-queue and runs new jobs.
It can be used as demon process.
public void actionListen ( $delay = 3 )
$delay |
integer | Number of seconds for waiting new job. |
actionRun()
public method
#
Runs all jobs from db-queue.
It can be used as cron job.
public void actionRun ( )
actions()
public method
#
public void actions ( )
beforeAction()
public method
#
public void beforeAction ( $action )
$action |
isWorkerAction()
protected method
#
protected void isWorkerAction ( $actionID )
$actionID |