tasks.TaskQueueBuilder class

Builder for creating aTaskQueueFunction.

Signature:

exportdeclareclassTaskQueueBuilder

Methods

MethodModifiersDescription
onDispatch(handler)Creates a handler for tasks sent to a Google Cloud Tasks queue.

tasks.TaskQueueBuilder.onDispatch()

Creates a handler for tasks sent to a Google Cloud Tasks queue.

Signature:

onDispatch(handler:(data:any,context:TaskContext)=>void|Promise<void>):TaskQueueFunction;

Parameters

ParameterTypeDescription
handler(data: any, context:TaskContext) => void | Promise<void>A callback to handle task requests.

Returns:

TaskQueueFunction

A function you can export and deploy.

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-04-24 UTC.