【问题标题】:Is there any way to set the max schedule time for Google Cloud Tasks to more than 720 hours?有什么方法可以将 Google Cloud Tasks 的最长计划时间设置为 720 小时以上?
【发布时间】:2021-06-21 19:20:46
【问题描述】:

我们正在使用 Google Cloud Tasks 来管理 Firebase Functions 中消息队列的时间安排,并且需要安排一些超过一个月的后续消息。我们收到此错误:

3 INVALID_ARGUMENT: The Task.scheduleTime, 2021-05-09T02:00:00-08:00, is too far in the future. Schedule time must be no more than 720h in the future.

此处记录的内容:https://cloud.google.com/tasks/docs/quotas

Google 允许您配置几乎所有其他设置 (https://cloud.google.com/tasks/docs/configuring-queues),但我看不出有任何方法可以绕过此限制。有吗?

【问题讨论】:

    标签: gcloud google-cloud-tasks


    【解决方案1】:

    你是对的,在某些资源中你可以请求增加配额,但遗憾的是 Maximum schedule time for a task 是不可能的,它似乎固定为 30 天。

    您可以使用 Cloud Scheduler,它可能更适合您的需求。您可以在here 中查看何时使用其中一个。

    如果您真的想使用 Cloud Tasks,另一种解决方法是创建 2 个单独的队列,正如 answer 建议的那样。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-28
      • 1970-01-01
      相关资源
      最近更新 更多