Constants

FIFO

FIFO = 'FIFO'

Worker priority constants

FILO

FILO = 'FILO'

Properties

$results

$results : array

Job results

Type

array

$failedExceptions

$failedExceptions : array<mixed,\Exception>

Failed jobs exceptions

Type

array<mixed,\Exception>

$priority

$priority : string

Worker type

Type

string

Methods

getJobResults()

getJobResults() : array

Get job results

Returns

array

getJobResult()

getJobResult(mixed  $index) : mixed

Get job result

Parameters

mixed $index

Returns

mixed

hasJobResults()

hasJobResults() : boolean

Has job results

Returns

boolean

getCompletedJobs()

getCompletedJobs() : array

Get completed jobs

Returns

array

hasCompletedJobs()

hasCompletedJobs() : boolean

Has completed jobs

Returns

boolean

getFailedJobs()

getFailedJobs() : array

Get failed jobs

Returns

array

hasFailedJobs()

hasFailedJobs() : boolean

Has failed jobs

Returns

boolean

getFailedExceptions()

getFailedExceptions() : array

Get failed exceptions

Returns

array

getFailedException()

getFailedException(mixed  $index) : \Exception

Get failed exception

Parameters

mixed $index

Returns

\Exception

hasFailedExceptions()

hasFailedExceptions() : boolean

Has failed exceptions

Returns

boolean

processNext()

processNext(\Pop\Queue\Queue  $queue = null) : integer

Process next job

Parameters

\Pop\Queue\Queue $queue

Returns

integer

__construct()

__construct(string  $priority = 'FIFO') 

Constructor

Instantiate the worker object

Parameters

string $priority

setPriority()

setPriority(string  $priority = 'FIFO') : \Pop\Queue\Processor\Worker

Set worker priority

Parameters

string $priority

Returns

\Pop\Queue\Processor\Worker

getPriority()

getPriority() : string

Get worker priority

Returns

string

isFifo()

isFifo() : boolean

Is worker fifo

Returns

boolean

isFilo()

isFilo() : boolean

Is worker filo

Returns

boolean

getJobs()

getJobs() : array

Get jobs

Returns

array

hasJobs()

hasJobs() : boolean

Has jobs

Returns

boolean

hasJob()

hasJob(integer  $index) : boolean

Has job

Parameters

integer $index

Returns

boolean

hasNextJob()

hasNextJob() : boolean

Has next job

Returns

boolean

getNextIndex()

getNextIndex() : integer

Get next index

Returns

integer