Class yii\queue\sync\Queue
Inheritance | yii\queue\sync\Queue » yii\queue\Queue » yii\base\Component |
---|
Sync Queue
Public Properties
Property | Type | Description | Defined 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
Method | Description | Defined 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 |
Protected Methods
Method | Description | Defined By |
---|---|---|
handleMessage() | yii\queue\Queue | |
pushMessage() | yii\queue\sync\Queue |
Events
Constants
Constant | Value | Description | Defined By |
---|---|---|---|
STATUS_DONE | 3 | yii\queue\Queue | |
STATUS_RESERVED | 2 | yii\queue\Queue | |
STATUS_WAITING | 1 | yii\queue\Queue |
Property Details
Method Details
public void init ( ) |
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 |
---|
Runs all jobs from queue.
public void run ( ) |
public integer status ( $id ) | ||
$id | string | Of a job message |
return | integer | Status code |
---|