检查是否达到 YQL 限制?
有什么方法(除了必须添加自定义代码之外)来检查我的应用程序是否超出了允许的 YQL 限制? (不确定每个应用程序限制或每个 IP 限制是否适用于我的情况)我假设达到限制后所有查询都会失败,但我想主动添加措施来防止这种情况发生。
我在应用程序的关键部分使用 YQL,并且由于每隔几秒发出一次查询,我怀疑我可能已接近极限。
Is there any way (other than having to add custom code) to check if my application has exceeded the YQL limits that are allowed? (Not sure if per application limit or the per IP limit applies in my case) I assume that all queries would fail after the limit is reached, but I'd like to be proactive in adding measures to prevent this from happening.
I am using YQL in a critical piece in the application and since a query is issued every few seconds, I suspect I might be nearing the limit.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是,在其他情况下也会返回错误代码 999,因此它不是达到每小时 10k 限制的可靠指标。
来自 Yahoo/YQL 的响应示例:
我认为,如果 YQL 能够像 Twitter 那样返回一个包含每小时剩余 YQL 调用的标头字段,那就太好了。
Twitter API 的 HTTP 响应标头的相关部分:
Unfortunately error code 999 is also returned in other situations, so it is not a reliable indicator of reaching the hourly 10k limit.
Example of response from Yahoo/YQL:
I think it would be great if YQL could return a header field with the remaining YQL calls for per hour, like Twitter does.
Relevant parts of the HTTP Response Header of the Twitter API:
如果您超过每小时 10k 次点击的限额,您将收到代码 999 的错误 - 相应地编写代码以避免被阻止。
If you exceed the hourly allowance of 10k hits you will get back an error with the code 999 - write your code accordingly to avoid being blocked.