如何配置无服务器Google Cloud Function在失败时重试?

时间:2019-05-28 19:51:08

标签: google-cloud-functions google-cloud-pubsub serverless

如何像使用无服务器的命令一样添加retry属性?

gcloud functions deploy FUNCTION_NAME --retry

看看我的serverless.yml文件:

service: myService

provider:
  name: google
  stage: prod
  runtime: nodejs8
  region: us-central1
  project: my-project
  credentials: my-credentials.json

plugins:
  - serverless-google-cloudfunctions

functions:
  first:
    handler: myFunction
    events:
      - event:
          eventType: providers/cloud.pubsub/eventTypes/topic.publish
          resource: my-topic-name

0 个答案:

没有答案