Firebase的Cloud Functions getDocument非常慢

时间:2018-09-09 13:40:54

标签: typescript firebase google-cloud-firestore google-cloud-functions

几周前,我创建了一个云函数,昨天注意到该函数(onCreate)的完成速度非常慢,大多数情况下不会触发事件。我删除了所有代码,只是使用console.log进行部署,并且像往常一样正常工作,但是当我添加第一个请求时,该功能花费了7到9秒钟。

exports.createLeague =functions.firestore.document("Leagues/{leagueId}").onCreate( async (change,context) => {
  const data = change.data()

  await db.collection("Users").doc("ola").get()

  return true
})

我尝试删除并部署所有功能,删除本地项目并创建一个新的云功能项目,更新所有firebase npm软件包,甚至创建了一个在欧洲具有欧洲功能的新firebase项目,该问题仍然存在

Cloud Fucntions Log Screenshot: first 3 without getDocument and the last one with

谢谢!

0 个答案:

没有答案