简体   繁体   English

在谷歌云运行中设置最大退休

[英]Set maximum retires in google cloud run

I am trying to set a custom number of retries if a task fails in Google Cloud Run.如果 Google Cloud Run 中的任务失败,我正在尝试设置自定义重试次数。 According to the documentation , I should use --max-retries to set the numbers of tres.根据文档,我应该使用--max-retries来设置 Tres 的数量。 I tried to set it with the following command我尝试使用以下命令进行设置

gcloud beta run deploy ${SAMPLE} \
  --set-env-vars GOOGLE_CLOUD_PROJECT=${GOOGLE_CLOUD_PROJECT} \
  --image gcr.io/${GOOGLE_CLOUD_PROJECT}/${SAMPLE} --timeout=30m  --cpu 4 --memory 4Gi --concurrency 1 --execution-environment gen2 --max-retries 2

But I got an error但我有一个错误

unrecognized arguments:
  --max-retries

I documention is also mentioned that the value can be modified in the console by "Click Container, Variables, Connections, Security to expand the job properties page."我的文档中还提到可以在控制台中通过"Click Container, Variables, Connections, Security to expand the job properties page." , but I am also not able to find this in the console. ,但我也无法在控制台中找到它。

Sometimes flags are only available via the CLI and not via the GUI.有时标志只能通过 CLI 而不是通过 GUI 获得。 In this case the --max-retries is in Beta hence why it's not in the GUI yet.在这种情况下,--max-retries 处于测试阶段,因此它还没有出现在 GUI 中。 It's possible the GUI features haven't rolledout everywhere yet GUI 功能可能还没有在所有地方推出

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM