问题描述
我正在使用 Cloud Functions onWrite 监听这条路径:
I am listening to this path using Cloud Functions onWrite:
/msgr/{a}/users/{b}
现在假设 users
下有 100 个孩子.
Now assume that there are 100 children under users
.
当我从控制台中删除 /msgr/x/users/12
时,会运行 onWrite 触发器,这与预期的一样.
When I delete /msgr/x/users/12
from the console, the onWrite trigger is run, which is as expected.
但是,如果我从控制台中删除 /msgr/x/users
,则 onWrite 函数根本不会运行.我希望 onWrite 触发器运行 100 次,与 users
下的子项数量一样多.
However, if I delete /msgr/x/users
from the console, the onWrite function is not run at all. I expect that the onWrite trigger is run 100 times, as much as the number of children under users
.
这是预期的行为吗?
推荐答案
作为 Firebaser Tom 在 firebase-talk 邮件列表中说:
As fellow Firebaser Tom said on the firebase-talk mailing list:
感谢报告,我发现了两个错误,希望在 5 月 10 日之前将它们投入生产.
更新:这个问题已经修复.将我原来的回复留给后人.
这篇关于删除父级时未调用 Cloud Functions for Firebase onWrite 触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!