tasks namespace

Functions

FunctionDescription
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

InterfaceDescription
AuthDataMetadata about the authorization used to invoke a function.
RateLimitsHow congestion control should be applied to the function.
RetryConfigHow a task should be retried in the event of a non-2xx return.
TaskQueueFunctionA handler for tasks.
TaskQueueOptions

Type Aliases

Type AliasDescription
RequestThe 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

ParameterTypeDescription
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

ParameterTypeDescription
optionsTaskQueueOptionsConfiguration 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.