PHP 5 has reached end of support and will be
deprecated
on January 31, 2026. After deprecation, you won't be able to deploy PHP 5
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing PHP
5 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you
migrate to the latest supported version of PHP.
\google\appengine\api\taskqueue\PushQueue
Stay organized with collections
Save and categorize content based on your preferences.
FINAL
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
__construct(string $name = 'default')
Construct a PushQueue
Parameters
Name |
Description |
$name
|
string
The name of the queue. |
getName
getName() : string
Return the queue's name.
Returns
string
The queue's name.
addTasks
addTasks(array<mixed,\google\appengine\api\taskqueue\PushTask> $tasks) : \google\appengine\api\taskqueue\An
Add tasks to the queue.
Parameters
Throws
\google\appengine\api\taskqueue\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.
\google\appengine\api\taskqueue\TaskQueueException
if there was a problem using the service.
Returns
\google\appengine\api\taskqueue\An
array containing the name of each task added, with the same
ordering as $tasks.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["PushQueue executes PushTasks by sending them back to the application as HTTP requests to application handlers."],["The `addTasks` method allows adding multiple PushTasks to the queue, throwing a `TaskAlreadyExistsException` if a task with the same name already exists."],["The maximum number of tasks that can be added in a single `addTasks` call is limited by `MAX_TASKS_PER_ADD`."],["The `getName` method retrieves the name of the queue as a string."],["The constructor `__construct` creates a new PushQueue, with an optional parameter to set the name of the queue, defaulting to 'default' if no name is given."]]],[]]