FilledStacks / firebase-backend

A package that helps with the management and expansion of a maintainable firebase backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

functions timeout and memory allocation

UndefinedMamun opened this issue · comments

Is there any way to define the timeout and memory allocation?
I was looking into the source code but couldn't find anything related to this.

If this feature is not available maybe it could be in the options object along with enableCors.

Hey, at the moment not.

If you can add that in a PR we can merge it in for you.

@UndefinedMamun You can do something like this.

import { runWith } from 'firebase-functions'

export const functionName = runWith({
  minInstances: 2,
  memory: '2GB',
  timeoutSeconds: 30,
})
  .region('europe-west1')
  .firestore.document('users/{userId}')
  .onCreate(async snap => {})