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

Наследование: extends QueueTask
Показать файл Открыть проект

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

Свойство Тип Описание
$failureMessage string Stores any failure messages triggered during run()
$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.

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

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

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

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

Will create one example job in the queue, which later will be executed using run();
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

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

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

Stores any failure messages triggered during run()
public string $failureMessage
Результат 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