Class yii\queue\gearman\Queue

Inheritanceyii\queue\gearman\Queue » yii\queue\cli\Queue » yii\queue\Queue » yii\base\Component
Implementsyii\base\BootstrapInterface

Gearman Queue

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
STATUS_DONE 3 yii\queue\Queue
STATUS_RESERVED 2 yii\queue\Queue
STATUS_WAITING 1 yii\queue\Queue

Property Details

$channel public property
public $channel 'queue'
$commandClass public property

Command class name

public string $commandClass = \yii\queue\gearman\Command::class
$host public property
public $host 'localhost'
$port public property
public $port 4730

Method Details

getClient() protected method

protected \GearmanClient getClient ( )
pushMessage() protected method

protected string pushMessage ( $message, $ttr, $delay, $priority )
$message string
$ttr integer

Time to reserve in seconds

$delay integer
$priority mixed
return string

Id of a job message

run() public method (available since version 2.0.2)

Listens queue and runs each job.

public null|integer run ( $repeat )
$repeat boolean

Whether to continue listening when queue is empty.

return null|integer

Exit code.

status() public method

public integer status ( $id )
$id string

Of a job message

return integer

Status code