How to keep App Engine Servlet Listening to Firebase

后端 未结 2 562
北恋
北恋 2021-01-06 01:22

I am following the tutorial at: https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio

I have everything working and the email is sending every

相关标签:
2条回答
  • 2021-01-06 01:36

    Your question is actually a question about AppEngine and how to create a Servlet that starts automatically and automatically performs some initialization.

    You will want to keep manual scaling on, but follow the steps here: https://cloud.google.com/appengine/docs/java/config/appconfig#using_a_load-on-startup_servlet

    for setting up your listeners on init() instead of an http request. What you are trying is definitely possible and have seen it run elsewhere.

    0 讨论(0)
  • 2021-01-06 01:37

    Simple answer is you can't do that yet. Google cloud endpoints have a timeout of 1 min. Cron jobs also have a timeout.

    What you need is triggers. This feature was demoed at Google io 16. Whenever data changes, a rest request is fired from firebase to a server and path of your choice.

    Even I am waiting for this to arrive soon.

    0 讨论(0)
提交回复
热议问题