我已经使用以下命令行脚本将一个函数部署到了gcloud:
gcloud functions deploy my_new_function --runtime python37 \
--trigger-event providers/cloud.firestore/eventTypes/document.create \
--trigger-resource projects/my_project_name/databases/default/documents/experiences/{eventId}
这成功地工作了,并且我的函数被部署了。以下是我预期的结果:
每当在experiences
firestore集合中创建新文档时,都会调用函数my_new_function
。
实际发生的情况:
永远不会因为在experiences
中创建新文档而调用my_new_function
发布于 2019-06-09 23:04:19
-- deploying from source control参数是针对源的,您并不打算这样做。您将希望改为使用deploy from your local machine。您可以从想要部署的目录运行gcloud。
https://stackoverflow.com/questions/56518379
复制相似问题