schedule_delay_seconds – The number of seconds after the current time at which to attempt or
retry the task. Should only be set if schedule_time is not set.
schedule_time – The time when the task is scheduled to be attempted or retried. Should only
be set if schedule_delay_seconds is not set.
dispatch_deadline_seconds – The deadline for requests sent to the worker. If the worker does
not respond by this deadline then the request is cancelled and the attempt is marked as
a DEADLINE_EXCEEDED failure. Cloud Tasks will retry the task according to the
RetryConfig. The default is 10 minutes. The deadline must be in the range of 15
seconds and 30 minutes (1800 seconds).
task_id –
The ID to use for the enqueued task. If not provided, one will be automatically
generated.
If provided, an explicitly specified task ID enables task de-duplication.
Task IDs should be strings that contain only letters ([A-Za-z]), numbers ([0-9]),
hyphens (-), and underscores (_) with a maximum length of 500 characters. If a task’s
ID is identical to that of an existing task or a task that was deleted or executed
recently then the call will throw an error with code functions/task-already-exists.
Another task with the same ID can’t be created for ~1hour after the original task was
deleted or executed.
Because there is an extra lookup cost to identify duplicate task IDs, setting ID
significantly increases latency.
Also, note that the infrastructure relies on an approximately uniform distribution
of task IDs to store and serve tasks efficiently. For this reason, using hashed strings
for the task ID or for the prefix of the task ID is recommended. Choosing task IDs that
are sequential or have sequential prefixes, for example using a timestamp, causes an
increase in latency and error rates in all task commands.
Push IDs from the Firebase Realtime Database make poor IDs because they are based on
timestamps and will cause contention (slowdowns) in your task queue. Reversed push IDs
however form a perfect distribution and are an ideal key. To reverse a string in Python
use reversedString=someString[::-1]
headers –
HTTP request headers to include in the request to the task queue function. These
headers represent a subset of the headers that will accompany the task’s HTTP request.
Some HTTP request headers will be ignored or replaced: Authorization, Host,
Content-Length, User-Agent and others cannot be overridden.
[[["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 2024-03-11 UTC."],[],[]]