How to configure timeout of Firebase functions on local

纵然是瞬间 提交于 2019-12-05 09:44:52

You can set the timeout and memory options in local using the RunWith function

const runtimeOpts = {
 timeoutSeconds: 300,
 memory: '1GB'
}

exports.myStorageFunction = functions
.runWith(runtimeOpts)
.storage
.object()
.onFinalize((object) = > {
  // do some complicated things that take a lot of memory and time
});

The maximum value for timeoutSeconds is 540, or 9 minutes. Valid values for memory are:

128MB
256MB
512MB
1GB
2GB

You can set the time more than 60 seconds.

Default timeout can be changed here: Console Cloud functions


select function -> name function -> edit -> timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!