class QueueManager

Methods

__construct(string $storagePath)

QueueManager constructor.

array
getActiveQueues()

Get the active queues with their pending items

mixed
getQueueItem($workerClass, $reference)

Get the payload for a queue item

queueUp($workerClass, $data)

Queue up a command for the specified worker.

removeQueueItem($workerClass, $reference)

Remove an item from a queue

singleton($workerClass, string $reference, mixed $data)

Set a singleton queue item

Details

at line line 28
__construct(string $storagePath)

QueueManager constructor.

Parameters

string $storagePath

Exceptions

Exception

at line line 45
array getActiveQueues()

Get the active queues with their pending items

Return Value

array

at line line 75
mixed getQueueItem($workerClass, $reference)

Get the payload for a queue item

Parameters

$workerClass
$reference

Return Value

mixed

at line line 87
queueUp($workerClass, $data)

Queue up a command for the specified worker.

Parameters

$workerClass
$data

at line line 105
removeQueueItem($workerClass, $reference)

Remove an item from a queue

Parameters

$workerClass
$reference

at line line 123
singleton($workerClass, string $reference, mixed $data)

Set a singleton queue item

Singletons only exist once. For example, it makes no sense to schedule a deployment many times. A single deployment catches up the repo and renders subsequent contemporaneous deployments unnecessary.

Parameters

$workerClass
string $reference
mixed $data