Force Channel API to poll

匿名 (未验证) 提交于 2019-12-03 08:44:33

问题:

Hopefully Moishe sees this: in development mode, the channel api client (javascript) resorts to polling... and uses a very fast polling rate. After poking around I found that if I set

goog.appengine.Socket.POLLING_TIMEOUT_MS = interval; 

I can control the polling rate. What I'm wondering is:

  • How do I know if/when the client is going to go into "poll mode" in production?
  • Is it possible to force the client into "poll mode"?
  • What happens if I reach the channel quota for my app? will the /_ah/channel/ endpoint just stop working altogether? or will it resort to polling?

-Thank you

回答1:

Answers:

  1. The client will never go into polling mode in production. The implementation is completely different in prod.

  2. See above

  3. The call to create_channel() will fail and you won't be able to get any more tokens. Existing tokens (and hence channels) will work until they time out.

Hope that helps!

-Moishe



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!