Relative Content

Tag Archive for firebasegoogle-cloud-firestoregoogle-cloud-functions

Check from a firebase cloud function quota data

Is there a way to check from a firebase cloud function (using firebase CLI I guess) my current quota data (number of read/write/deletes of my project in the current day). The idea is that I have some batch house keeping to do that is non-critical (it could be done any day) in my firestore database. I would like to deploy some cloud function that does this and schedule it daily before the end of the day. But ideally I want it to be done only if the quota limits are not reached to pay as little as possible. So I want to first check my quota data (how many write/reads/deletes has my project done so far that day) programmatically and if it’s below the free tier limits, perform the transactions.

http function can’t update document

i’m working on a firestore database and want to count the number of documents in a collection called “images” and then assign that value to a another document in tracking collection. The function prints the size but it doesn’t update the “tracking” collection.

Accessing a a non default firestore database from a firebase scheduled cloud function

I have written a cloud function that deploys perfectly well on a schedule, but only for the default database. In our Firebase project, we have a default prod database and a named dev database, and I can’t figure out how to talk to the dev database. I am currently using v1, and I know you need to use v2, but I still can’t figure out how to change the database, and this version works for at least one database.