Property | Type | Description | |
---|---|---|---|
$db | string | |
This will use default db component from Yii application. | |
$hardDelete | boolean | Whether to do hard delete of the deleted job, instead of just flagging the status. | |
$tableName | string | The table should be pre-created as follows for MySQL: php CREATE TABLE queue ( id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, status TINYINT NOT NULL DEFAULT 0, timestamp DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, data LONGBLOB ); |
Method | Description | |
---|---|---|
deleteJob ( UrbanIndo\Yii2\Queue\Job $job ) : boolean | Delete the job. Override this for the queue implementation. | |
getSize ( ) : integer | Returns the number of queue size. | |
init ( ) : void | ||
purge ( ) : boolean | Purge the whole queue. | |
releaseJob ( UrbanIndo\Yii2\Queue\Job $job ) : boolean | Restore job from active to ready. |
Method | Description | |
---|---|---|
fetchJob ( ) : UrbanIndo\Yii2\Queue\Job | boolean | Return next job from the queue. | |
fetchLatestRow ( ) : array | Fetch latest ready job from the table. | |
flagRunningRow ( array $row ) : boolean | Flag a row as running. This will update the row ID and status if ready. | |
postJob ( UrbanIndo\Yii2\Queue\Job $job ) : boolean | Post new job to the queue. This contains implementation for database. |
protected fetchLatestRow ( ) : array | ||
return | array |
protected flagRunningRow ( array $row ) : boolean | ||
$row | array | The row to update. |
return | boolean | Whether successful or not. |
public releaseJob ( UrbanIndo\Yii2\Queue\Job $job ) : boolean | ||
$job | UrbanIndo\Yii2\Queue\Job | The job to restore. |
return | boolean | whether the operation succeed. |
public string|Connection,yii\db $db | ||
return | string | |
public bool $hardDelete | ||
return | boolean |
public string $tableName | ||
return | string |