ebg11
ebg11

Reputation: 1046

Setting function max instances limits in index.js

Are we able to specify the max instances in the index.js export declaration?

https://cloud.google.com/functions/docs/max-instances

e.g. this

exports.myFunction = functions.region(MY_REGION).https.onCall((data, context) => {

});

Upvotes: 1

Views: 362

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598827

This seems to be the magic configuration:

functions
    .runWith({ maxInstances: 1 })
    ...

See: https://github.com/firebase/firebase-functions/pull/624

Upvotes: 2

Related Questions