tasks.TaskQueueBuilder class

Builder for creating a TaskQueueFunction.

Signature:

export declare class TaskQueueBuilder 

Methods

Method Modifiers Description
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

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

Returns:

TaskQueueFunction

A function you can export and deploy.