如何增加Cloud Scheduler请求超时期限? [英] How to increase Cloud Scheduler request timeout deadline?

查看:82
本文介绍了如何增加Cloud Scheduler请求超时期限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从App Engine Cron作业迁移到Cloud Scheduler,但是在Cloud Scheduler中,请求截止期限超时是60秒,而不是从Cron作业发出请求的10分钟.

I want to migrate from App Engine Cron jobs to Cloud Scheduler, but in Cloud Scheduler the request deadline timeout is 60 seconds, not the 10 minutes that has the requests from Cron jobs.

是否可以将Cloud Scheduler App Engine请求配置为截止时间为10分钟?

Is there a way to configure Cloud Scheduler App Engine request's to have a deadline timeout of 10 minutes?

推荐答案

根据他们的scheduler.v1beta1,可以使用 attemptDeadline 设置该Deadline.

According to their scheduler.v1beta1, it is possible to set that Deadline using the attemptDeadline.

尝试工作的截止日期.如果请求处理程序在此截止日期之前未响应,则取消请求,并将尝试标记为DEADLINE_EXCEEDED失败.失败的尝试可以在执行日志中查看.Cloud Scheduler将根据RetryConfig重试作业.

The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a DEADLINE_EXCEEDED failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig.

此截止日期允许的持续时间为:

The allowed duration for this deadline is:

对于HTTP目标,介于15秒和30分钟之间.对于App Engine HTTP目标,介于15秒和24小时之间.对于PubSub目标,该字段将被忽略.

For HTTP targets, between 15 seconds and 30 minutes. For App Engine HTTP targets, between 15 seconds and 24 hours. For PubSub targets, this field is ignored.

https://cloud.google.com/nodejs/docs/reference/scheduler/0.3.x/google.cloud.scheduler.v1beta1#.Job

这篇关于如何增加Cloud Scheduler请求超时期限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆