Questions tagged [google-cloud-tasks]
262 questions
2
votes
1 answer
How to avoid memory leak when using pub sub to call function?
I stuck on performance issue when using pubsub to triggers the function.
//this will call on index.ts
export function downloadService() {
// References an existing subscription
const subscription = pubsub.subscription("DOWNLOAD-sub");
//…

scarlet pro
- 181
- 12
2
votes
1 answer
How to configure GCP Cloud Tasks Queue for very slow dispatch due to 3rd party SLA downstream?
I need to set up a Cloud Tasks queue that sends HTTP requests to a 3rd party API. The external API can only accept a few requests per minute and I would like to set up rate limiting on the Cloud Tasks so that tasks flow at a very slow pace: no more…

Eric Crescioni
- 299
- 3
- 10
2
votes
1 answer
Receiving a region error deploying Firebase Functions with Google Cloud Task client
Problem
When I deploy my Firebase Functions importing Google Cloud Tasks @google-cloud/tasks I receive a region errror.
To demonstrate this I include the code giving successful and unsuccessful deployment.
Successfull
import * as functions from…

Michael Zur
- 915
- 1
- 6
- 14
2
votes
1 answer
How to call a Firebase Function from Cloud Tasks in a secure manner?
I followed the Google sample code in Using Cloud Tasks to Trigger Cloud Functions. I can add the task to the queue as a HTTP request using an OIDC token config with a working service account email and audience (Cloud Tasks library doesn't allow you…

Peter Hägg
- 158
- 1
- 9
2
votes
1 answer
Target localhost from GCP Cloud Tasks
I am working with GCP Cloud Tasks API on localhost at the moment. I am able to enqueue tasks in Google from localhost by injecting my default credentials.
I am passing a localhost URL as the callback when the task is to execute. Is this possible to…

cpboyce
- 187
- 9
2
votes
0 answers
Google Cloud Tasks get response message
I am using Google Cloud Tasks for asynchronous communication between HTTP microservices.
My task handler is a simple Java Spring application.
I am wondering if there is any way to get response message in case that a task gets failed using GET TASK…

George
- 21
- 1
2
votes
2 answers
INVALID_ARGUMENT: Location 'europe-west1' is not a valid location
My error code after calling the below (which is shortened for brevity) within a cloud functions is:
Error: 3 INVALID_ARGUMENT: Location 'europe-west1' is not a valid location. Use ListLocations to list valid locations.
If I change to location to…

JTInfinite
- 360
- 4
- 14
2
votes
2 answers
"PERMISSION_DENIED: Missing or insufficient permissions" when firestore function called using google cloud task
I have created one function which adds an entry to the Firestore database.
const functions = require("firebase-functions");
const admin = require('firebase-admin');
admin.initializeApp();
exports.addMessage = functions.https.onRequest(async (req,…

Dhara
- 1,431
- 4
- 29
- 47
2
votes
1 answer
Is there a response code to mark a Google Cloud Task as permanently failed so it won't retry?
I have a Firebase HTTPS function that sends timed messages and is triggered by Google Cloud Tasks.
According to the Cloud Tasks documentation, any response code outside the 200 range is seen as a failure and will trigger a retry.
This function needs…

ForrestLyman
- 1,544
- 2
- 17
- 24
2
votes
2 answers
Queue large number of tasks from Google cloud function
I'm trying to use cloud functions to update data by calling an external API once a day.
So far I have:
Cloud Schedule set to invoke Function 1
Function 1 - loop over items and create a task for each item
Task - invoke Function 2 with data…

Charlie Morton
- 737
- 1
- 7
- 17
2
votes
1 answer
Check if Cloud Task Queue is empty
I'm working on a project with a Node.js backend. It has a Cloud Task queue component and it creates hundreds of tasks. I need to run something once all the tasks are completed. I've been pouring over the Cloud Task queue documentation and searching…

user8694-03
- 359
- 3
- 15
2
votes
1 answer
Deleting a Google Cloud Task does not stop task running
I have a task queue which users can push tasks onto, only one task can run at a time enforced by the concurrency setting for the queue. In some cases (e.g. long running task) they may wish to cancel a running task in order to free up the queue to…

Tom
- 21
- 2
2
votes
2 answers
Google Cloud Task not calling http requests
I have created a google cloud task and the queue keeps retrying and the function is not getting invoked as well.
This is the log from the cloud console.
attemptResponseLog: {
attemptDuration: "0.133874s"
dispatchCount: "19"
…

JDForLife
- 91
- 2
- 10
2
votes
2 answers
DEADLINE_EXCEEDED while adding tasks to Google Cloud Tasks
I'm occasionally getting an error called DEADLINE_EXCEEDED while adding tasks to Google Cloud Tasks from Node.js client. It's only 17 tasks that I tried to add in a for-loop. Not sure why this is happening occasionally and sometimes works perfectly…

Gijo Varghese
- 11,264
- 22
- 73
- 122
2
votes
1 answer
Google Cloud Tasks not dispatching HTTP requests
I'll start this by saying I'm new to using Google Cloud Tasks, so please forgive me if this is an obvious issue.
I've created a new Cloud Task queue using gcloud with the command:
gcloud tasks queues create default
I've then proceeded to add tasks…

Mark B
- 2,870
- 3
- 20
- 18