PHP Class Queue\Shell\Task\QueueExecuteTask

Inheritance: extends QueueTask
Show file Open project: dereuromark/cakephp-queue

Public Properties

Property Type Description
$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.

Public Methods

Method Description
add ( ) : void Add functionality.
run ( array $data, integer $id ) : boolean Run function.

Method Details

add() public method

Will create one example job in the queue, which later will be executed using run();
public add ( ) : void
return void

run() public method

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
return boolean Success

Property Details

$failureMessage public property

Stores any failure messages triggered during run()
public string $failureMessage
return string

$retries public property

Number of times a failed instance of this task should be restarted before giving up.
public int $retries
return integer

$timeout public property

Timeout for run, after which the Task is reassigned to a new worker.
public int $timeout
return integer