Creates a task and adds it to the queue. Tasks cannot be updated after creation. This action requires cloudtasks.tasks.create IAM permission on the service account.
TaskQueue.delete()
Deletes an enqueued task if it has not yet completed.
Signature:
delete(id:string):Promise<void>;
Parameters
Parameter
Type
Description
id
string
the ID of the task, relative to this queue.
Returns:
Promise<void>
A promise that resolves when the task has been deleted.
TaskQueue.enqueue()
Creates a task and adds it to the queue. Tasks cannot be updated after creation. This action requires cloudtasks.tasks.create IAM permission on the service account.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-07-12 UTC."],[],[],null,["# TaskQueue class\n\nThe `TaskQueue` interface.\n\n**Signature:** \n\n export declare class TaskQueue\u003cArgs = Record\u003cstring, any\u003e\u003e \n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|---------------------------------------------------------------------------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [delete(id)](./firebase-admin.functions.taskqueue.md#taskqueuedelete) | | Deletes an enqueued task if it has not yet completed. |\n| [enqueue(data, opts)](./firebase-admin.functions.taskqueue.md#taskqueueenqueue) | | Creates a task and adds it to the queue. Tasks cannot be updated after creation. This action requires `cloudtasks.tasks.create` IAM permission on the service account. |\n\nTaskQueue.delete()\n------------------\n\nDeletes an enqueued task if it has not yet completed.\n\n**Signature:** \n\n delete(id: string): Promise\u003cvoid\u003e;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|--------|---------------------------------------------|\n| id | string | the ID of the task, relative to this queue. |\n\n**Returns:**\n\nPromise\\\u003cvoid\\\u003e\n\nA promise that resolves when the task has been deleted.\n\nTaskQueue.enqueue()\n-------------------\n\nCreates a task and adds it to the queue. Tasks cannot be updated after creation. This action requires `cloudtasks.tasks.create` IAM permission on the service account.\n\n**Signature:** \n\n enqueue(data: Args, opts?: TaskOptions): Promise\u003cvoid\u003e;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|----------------------------------------------------------|---------------------------------------------|\n| data | Args | The data payload of the task. |\n| opts | [TaskOptions](./firebase-admin.functions.md#taskoptions) | Optional options when enqueuing a new task. |\n\n**Returns:**\n\nPromise\\\u003cvoid\\\u003e\n\nA promise that resolves when the task has successfully been added to the queue."]]