我有一个带Firebase功能的Firebase项目,该功能会在对实时数据库中的节点进行更改时触发.我在2个月前部署并测试了Firebase功能,一切正常.当我现在更新数据库中的节点时,Firebase功能不再触发.为什么不再触发Firebase功能?在一段时间不活动后,数据库侦听器是否被禁用?我不认为这是由于实例旋转时间,因为等待几分钟之后仍未触发该功能.当我重新部署完全相同的功能时,一切都会重新运作.
我们有一个使用 Drive API 管理 Google Drive 文件和文件夹共享权限的应用程序。当我们的应用程序尝试更新某些文件或文件夹的共享设置时,我们会收到“共享RateLimitExceeded”错误:
Caused by: com.google.api.server.spi.response.UnauthorizedException: 403 FORBIDDEN { "code" : 403, "errors" : [ {
"domain" : "global",
"message" : "Rate limit exceeded. User message: \"These item(s) could not be shared because a rate limit was exceeded: SupportMenuItem.class\"",
"reason" : "sharingRateLimitExceeded" } ], "message" : "Rate limit exceeded. User message: \"These item(s) could not be shared because a rate limit was exceeded: FILENAME\"" }
Run Code Online (Sandbox Code Playgroud)
我们已经将 API 调用配置为不发送电子邮件,并且我们的服务帐户在更改权限时会模拟不同的用户以避免超出速率限制。
我们如何找出超出了哪个共享限制?一旦我们知道超出了哪个共享限制,我们在哪里可以找到该共享限制有多高?是每分钟共享限制还是每天共享限制?我们需要有关错误的更多信息,以便我们可以调整我们的脚本,以便不再超出共享限制。文档中有关错误的信息仅限于对我们有任何价值。
用于批处理pubsub请求的NODEJS示例代码如下所示:
// Imports the Google Cloud client library
const PubSub = require(`@google-cloud/pubsub`);
// Creates a client
const pubsub = new PubSub();
/**
* TODO(developer): Uncomment the following lines to run the sample.
*/
// const topicName = 'your-topic';
// const data = JSON.stringify({ foo: 'bar' });
// const maxMessages = 10;
// const maxWaitTime = 10000;
// Publishes the message as a string, e.g. "Hello, world!" or JSON.stringify(someObject)
const dataBuffer = Buffer.from(data);
pubsub
.topic(topicName)
.publisher({
batching: {
maxMessages: maxMessages,
maxMilliseconds: …Run Code Online (Sandbox Code Playgroud)