Firebase onWrite触发器的云端函数删除父项时不会调用 [英] Cloud Functions for Firebase onWrite trigger not called when parent is deleted

查看:134
本文介绍了Firebase onWrite触发器的云端函数删除父项时不会调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



/ msgr / {a} / users / {b} 我正在使用Cloud Functions onWrite侦听此路径c $ c
$ b

现在假设在用户下有100个孩子。



当我从控制台中删除 / msgr / x / users / 12 时,onWrite触发器就会按照预期运行。



但是,如果从控制台中删除 / msgr / x / users ,onWrite函数根本就不运行。我期望onWrite触发器运行100次,与用户



这是预期的行为吗?

#!topic / firebase-talk / -udC4weRFO0rel =nofollow noreferrer> Tom在firebase-talk邮件列表中说:
$ b


感谢报告,我发现了两个bug,我希望能够在5月10日之前将它们投入生产。强>更新:这个问题已经修复。留下我对于后代的原始回应。

I am listening to this path using Cloud Functions onWrite:

/msgr/{a}/users/{b}

Now assume that there are 100 children under users.

When I delete /msgr/x/users/12 from the console, the onWrite trigger is run, which is as expected.

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.

Is this the expected behavior?

解决方案

As fellow Firebaser Tom said on the firebase-talk mailing list:

Thanks for reporting, I found two bugs, I hope to have them rolled out to production by May 10th.

Update: this problem has been fixed. Leaving my original response for posterity.

这篇关于Firebase onWrite触发器的云端函数删除父项时不会调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆