Class yii\queue\sync\Queue

Inheritanceyii\queue\sync\Queue » yii\queue\Queue » yii\base\Component

Sync Queue

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$attempts integer Default attempt count yii\queue\Queue
$handle boolean yii\queue\sync\Queue
$serializer yii\queue\serializers\SerializerInterface|array yii\queue\Queue
$strictJobType boolean Whether to enable strict job type control. yii\queue\Queue
$ttr integer Default time to reserve a job yii\queue\Queue

Public Methods

Hide inherited methods

MethodDescriptionDefined By
delay() Sets delay for later execute yii\queue\Queue
getWorkerPid() Uses for CLI drivers and gets process ID of a worker. yii\queue\Queue
handleError() yii\queue\Queue
init() yii\queue\sync\Queue
isDone() yii\queue\Queue
isReserved() yii\queue\Queue
isWaiting() yii\queue\Queue
priority() Sets job priority yii\queue\Queue
push() Pushes job into queue yii\queue\Queue
run() Runs all jobs from queue. yii\queue\sync\Queue
status() yii\queue\sync\Queue
ttr() Sets TTR for job execute yii\queue\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

$handle public property
public boolean $handle false

Method Details

init() public method

public void init ( )
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

Runs all jobs from queue.

public void run ( )
status() public method

public integer status ( $id )
$id string

Of a job message

return integer

Status code