0

What I want is simple and easy, but I don't know if it is possible to do it.

Func 1:

exports.readProducts = functions.https.onRequest(async (req, res) => {
    //SOME CODE
});

Func 2:

exports.onCountChange=functions.database.ref('/ANALYTICS/count').onWrite((change, context) => {
    //SOME CODE
});

I want this 2 functions to run like transaction, so if 2 people call/change the value at the same time, it should run one call at the time.

1
  • 6
    It's not possible to make cloud function invocations happen in order or block one another, if that's what you're asking. Commented Aug 24, 2022 at 17:50

1 Answer 1

2

As mentioned by @Doug Stevenson, it is impossible to make the cloud functions invocations happen in sequence or block another.

Additionally, here is a Google group that you can use for anything related to firebase.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.