PHP 클래스 Queue\Shell\Task\QueueTask

Common Queue plugin tasks properties and methods to be extended by custom tasks.
상속: extends Cake\Console\Shell
파일 보기 프로젝트 열기: dereuromark/cakephp-queue 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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