firebase 如何在GCP函数v2 Firestore触发器中添加timeoutSeconds

ct3nt3jp  于 2023-05-18  发布在  其他
关注(0)|答案(1)|浏览(117)

下面是我的v2 Firebase函数的代码:

exports.onusercreatesetauth = onDocumentCreated(
    {
        document: "/accounts/{accountID}/users/{docID}",
        timeoutSeconds: 90
    },
    async (event) => {         })

当我尝试部署它时,我得到一个错误,我的参数无效:The request was invalid: unsupported Cloud Firestore region us-central1: invalid argument
设置timeoutSeconds和引用应该触发函数的文档的正确方法是什么?

m3eecexj

m3eecexj1#

更新:
尝试“setGlobalOptions”:
https://firebase.google.com/docs/functions/2nd-gen-upgrade#set_runtime_options
尝试创建两个参数,第一个参数是文档字符串,另一个是设置对象.
https://firebase.google.com/docs/functions/firestore-events?gen=2nd

相关问题