tasks.TaskQueueFunction interface

A handler for tasks.

Signature:

exportinterfaceTaskQueueFunction

Properties

PropertyTypeDescription
__endpointManifestEndpoint
__requiredAPIsManifestRequiredAPI[]
__triggerunknown

Methods

MethodDescription
run(data, context)The callback passed to theTaskQueueFunction constructor.

tasks.TaskQueueFunction.__endpoint

Signature:

__endpoint:ManifestEndpoint;

tasks.TaskQueueFunction.__requiredAPIs

Signature:

__requiredAPIs?:ManifestRequiredAPI[];

tasks.TaskQueueFunction.__trigger

Signature:

__trigger:unknown;

tasks.TaskQueueFunction.run()

The callback passed to theTaskQueueFunction constructor.

Signature:

run(data:any,context:TaskContext):void|Promise<void>;

Parameters

ParameterTypeDescription
dataanyThe body enqueued into a task queue.
contextTaskContextThe request context of the enqueued task

Returns:

void | Promise<void>

Any return value. Google Cloud Functions will await any promise before shutting down your function. Resolved return values are only used for unit testing purposes.

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 2025-06-04 UTC.