class PushQueue (View source)

A PushQueue executes PushTasks by sending the task back to the application in the form of an HTTP request to one of the application's handlers.

Constants

MAX_TASKS_PER_ADD

The maximum number of tasks in a single call addTasks.

Methods

__construct(string $name = 'default')

Construct a PushQueue

string
getName()

Return the queue's name.

An
addTasks(PushTask[] $tasks)

Add tasks to the queue.

Details

__construct(string $name = 'default')

Construct a PushQueue

Parameters

string $name The name of the queue.

string getName()

Return the queue's name.

Return Value

string The queue's name.

An addTasks(PushTask[] $tasks)

Add tasks to the queue.

Parameters

PushTask[] $tasks The tasks to be added to the queue.

Return Value

An array containing the name of each task added, with the same ordering as $tasks.

Exceptions

TaskAlreadyExistsException if a task of the same name already exists in the queue. If this exception is raised, the caller can be guaranteed that all tasks were successfully added either by this call or a previous call. Another way to express it is that, if any task failed to be added for a different reason, a different exception will be thrown.
TaskQueueException if there was a problem using the service.