Python 从云源存储库部署时未触发Firestore云功能
我创建了一个google云源存储库,并在main.py(我的根目录)中添加了以下内容 我使用以下命令部署了该函数:Python 从云源存储库部署时未触发Firestore云功能,python,firebase,google-cloud-platform,google-cloud-firestore,google-cloud-functions,Python,Firebase,Google Cloud Platform,Google Cloud Firestore,Google Cloud Functions,我创建了一个google云源存储库,并在main.py(我的根目录)中添加了以下内容 我使用以下命令部署了该函数: $ gcloud beta functions deploy sample_function \ --entry-point sample_function \ --runtime python37 \ --source https://source.developers.google.com/projects/project_id/repos/reposito
$ gcloud beta functions deploy sample_function \
--entry-point sample_function \
--runtime python37 \
--source https://source.developers.google.com/projects/project_id/repos/repository_id/moveable-aliases/my_branch_name \
--region europe-west1 \
--trigger-event providers/cloud.firestore/eventTypes/document.create \
--timeout 60s \
--trigger-resource projects/my_project_id/databases/default/documents/finalDb/{orgId}/tasks/{taskId}
已成功部署该功能,如图所示:
但在指定的触发路径添加文档时不会触发云函数。我检查了云函数日志,日志中没有显示该函数已执行的条目
可能是什么问题?部署期间我是否遗漏了什么
p.S我使用内联编辑器编写了类似的函数,它们似乎工作正常特定于Firebase的触发器(包括Firestore)目前在python和gcloud中不受支持 编辑
gcloud现在支持用所有支持的语言编写和部署。。但是,当使用内联代码编辑器部署相同的代码时,它们似乎可以工作。你知道什么时候会得到支持吗。我知道正如你所说没有承诺和时间表,但我觉得这是一个基本功能,似乎遗漏了没有时间表,对不起。我想澄清你所说的不受支持是什么意思,因为命令gcloud functions event types list在itI中确实列出了firestore我对gcloud不是很熟悉,但我可以告诉您,开发人员还没有打算在python.Cool中编写特定于Firebase的触发器。谢谢顺便说一句,道格,喜欢你在youtube上的视频。祝您愉快:)
$ gcloud beta functions deploy sample_function \
--entry-point sample_function \
--runtime python37 \
--source https://source.developers.google.com/projects/project_id/repos/repository_id/moveable-aliases/my_branch_name \
--region europe-west1 \
--trigger-event providers/cloud.firestore/eventTypes/document.create \
--timeout 60s \
--trigger-resource projects/my_project_id/databases/default/documents/finalDb/{orgId}/tasks/{taskId}