onPublish(handler: (event: Event<Message>) => PromiseLike<any> | any): CloudFunction<Message>
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/52231acc-a382-4155-a927-bdf50c2f28f2%40googlegroups.com.
There is a "send feedback" link on that docs page; I'd recommend using it : )☼, Kato
On Wed, Apr 26, 2017 at 2:55 AM, nAv <pat...@gmail.com> wrote:
Perfect! Fixed the issue, thanks for that. Wish this was mentioned on the documentation
On Wednesday, April 26, 2017 at 8:55:29 AM UTC+5:30, Conor Dockry wrote:Looks like your handler function needs to return Promise
onPublish(handler: (event: Event<Message>) => PromiseLike<any> | any): CloudFunction<Message>
On Tuesday, April 25, 2017 at 10:22:49 AM UTC-4, nAv wrote:Hello there,As the subject suggests, I have a function using the:functions.pubsub.topic('my-topic').onPublish(event => {}) APIMy function goes on to make a remote request, and does a bunch of work once that request is done. Seeing that the event is immediately returned (there's no "callback"), there's a bunch of funky stuff happening: I get the remaining log messages (after my remote request) 30-seconds+ after the initial event was handled. Any idea how to resolve this? The remote request shouldn't take more than 1s to return.This issue doesn't happen with HTTP triggers where I can make sure to hit res.status(... after my work is complete.Thanks
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/52231acc-a382-4155-a927-bdf50c2f28f2%40googlegroups.com.