tasks namespace Stay organized with collections Save and categorize content based on your preferences.
Functions
| Function | Description |
|---|---|
| onTaskDispatched(handler) | Creates a handler for tasks sent to a Google Cloud Tasks queue. |
| onTaskDispatched(options, handler) | Creates a handler for tasks sent to a Google Cloud Tasks queue. |
Interfaces
| Interface | Description |
|---|---|
| AuthData | Metadata about the authorization used to invoke a function. |
| RateLimits | How congestion control should be applied to the function. |
| RetryConfig | How a task should be retried in the event of a non-2xx return. |
| TaskQueueFunction | A handler for tasks. |
| TaskQueueOptions |
Type Aliases
| Type Alias | Description |
|---|---|
| Request | The request used to call a task queue function. |
tasks.onTaskDispatched()
Creates a handler for tasks sent to a Google Cloud Tasks queue.
Signature:
exportdeclarefunctiononTaskDispatched<Args=any>(handler:(request:Request<Args>)=>void|Promise<void>):TaskQueueFunction<Args>;Parameters
| Parameter | Type | Description |
|---|---|---|
| handler | (request: Request<Args>) => void | Promise<void> | A callback to handle task requests. |
Returns:
TaskQueueFunction<Args>
A function you can export and deploy.
tasks.onTaskDispatched()
Creates a handler for tasks sent to a Google Cloud Tasks queue.
Signature:
exportdeclarefunctiononTaskDispatched<Args=any>(options:TaskQueueOptions,handler:(request:Request<Args>)=>void|Promise<void>):TaskQueueFunction<Args>;Parameters
| Parameter | Type | Description |
|---|---|---|
| options | TaskQueueOptions | Configuration for the task queue or Cloud Function. |
| handler | (request: Request<Args>) => void | Promise<void> | A callback to handle task requests. |
Returns:
TaskQueueFunction<Args>
A function you can export and deploy.
tasks.Request
The request used to call a task queue function.
Signature:
exporttypeRequest<T=any>=TaskContext &{data:T;};Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-07-10 UTC.