【问题标题】:Cron for specific service/version google app engine特定服务/版本谷歌应用引擎的 Cron
【发布时间】:2018-12-21 19:20:31
【问题描述】:

我在同一个项目中有 2 个服务。

一个服务名称是 BAR 一个服务名称是 FOO

我在 BAR 上有 cron,我有两个环境“默认”和“暂存”

我可以这样设置 Cron

- description: "STAGING: BAR"
  url: /en/cron
  schedule: 1 of month 07:00
  target: staging
  retry_parameters:
    min_backoff_seconds: 2.5
    max_doublings: 5

- description: "PROD: BAR"
  url: /en/cron
  schedule: 1 of month 07:00
  target: default
  retry_parameters:
    min_backoff_seconds: 2.5
    max_doublings: 5

即使使用 FOO,我也想这样做 我有两个环境“foo”和“stagingfoo”

- description: "STAGING: FOO"
  url: /en/foo/cron
  schedule: 1 of month 07:00
  target: stagingfoo
  retry_parameters:
    min_backoff_seconds: 2.5
    max_doublings: 5

- description: "PROD: FOO"
  url: /en/foo/cron
  schedule: 1 of month 07:00
  target: foo
  retry_parameters:
    min_backoff_seconds: 2.5
    max_doublings: 5

但是 stagingfoo 报错了,可能是找不到路由。 我的控制台看不到任何错误

> target: staging works 
> target: default works 
> target: foo works target:
> stagingfoo doesn't work

FOO root 中只有一个cron.yaml 文件

【问题讨论】:

    标签: python-2.7 google-app-engine cron


    【解决方案1】:

    您必须像这样指定“FOO”目标:

    - description: "STAGING: FOO"
      url: /en/foo/cron
      schedule: 1 of month 07:00
      target: stagingfoo-dot-foo
      retry_parameters:
        min_backoff_seconds: 2.5
        max_doublings: 5
    

    【讨论】:

    猜你喜欢
    • 2014-03-22
    • 2011-08-21
    • 2011-01-30
    • 2012-03-22
    • 2014-07-22
    • 2013-02-07
    • 1970-01-01
    • 2013-07-05
    • 1970-01-01
    相关资源
    最近更新 更多