PHP Класс Queue\Shell\Task\QueueTask

Common Queue plugin tasks properties and methods to be extended by custom tasks.
Наследование: extends Cake\Console\Shell
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$QueuedJobs Queue\Model\Table\QueuedJobsTable
$queueModelClass string
$retries integer Number of times a failed instance of this task should be restarted before giving up.
$timeout integer Timeout for run, after which the Task is reassigned to a new worker.

Открытые методы

Метод Описание
__construct ( ConsoleIo $io = null )
add ( ) : void Add functionality.
run ( array $data, integer $id ) : boolean Run function.

Описание методов

__construct() публичный Метод

public __construct ( ConsoleIo $io = null )
$io Cake\Console\ConsoleIo IO

add() публичный Метод

Add functionality.
public add ( ) : void
Результат void

run() публичный Метод

This function is executed, when a worker is executing a task. The return parameter will determine, if the task will be marked completed, or be requeued.
public run ( array $data, integer $id ) : boolean
$data array The array passed to QueuedTask->createJob()
$id integer The id of the QueuedTask
Результат boolean Success

Описание свойств

$QueuedJobs публичное свойство

public QueuedJobsTable,Queue\Model\Table $QueuedJobs
Результат Queue\Model\Table\QueuedJobsTable

$queueModelClass публичное свойство

public string $queueModelClass
Результат string

$retries публичное свойство

Number of times a failed instance of this task should be restarted before giving up.
public int $retries
Результат integer

$timeout публичное свойство

Timeout for run, after which the Task is reassigned to a new worker.
public int $timeout
Результат integer