Send feedback
TaskQueue class
Stay organized with collections
Save and categorize content based on your preferences.
The TaskQueue
interface.
Signature:
export declare class TaskQueue<Args = Record<string, any>>
Methods
Method
Modifiers
Description
delete(id)
Deletes an enqueued task if it has not yet completed.
enqueue(data, opts)
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.
Signature:
enqueue(data: Args, opts?: TaskOptions): Promise<void>;
Parameters
Parameter
Type
Description
data
Args
The data payload of the task.
opts
TaskOptions
Optional options when enqueuing a new task.
Returns:
Promise<void>
A promise that resolves when the task has successfully been added to the queue.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-07-12 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2023-07-12 UTC."}
[[["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."]]