aws-step-functions - AWS Step 函数重试逻辑,最大 IntervalSeconds?
问题描述
我正在使用 AWS Step 功能步骤,更具体地说是错误处理。
在本文档中:https ://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html ,它提到Retry
如果步骤无法重试该步骤,我们可以使用该子句:
"Retry": [ {
"ErrorEquals": [ "States.Timeout" ],
"IntervalSeconds": 3,
"MaxAttempts": 2,
"BackoffRate": 1.5
} ]
我可以设置IntervalSeconds
的最大值是多少?MaxAttempts
我希望能够重试 2-4 天,每 4 小时重试一次。是否可以将这些字段设置为如此高的值?例子:
"Retry": [ {
"ErrorEquals": [ "States.ALL" ],
"IntervalSeconds": 14400,
"MaxAttempts": 12,
"BackoffRate": 1
} ]
解决方案
IntervalSeconds
和的最大值MaxAttempts
是99999999
。我在文档中没有看到任何提及,但您可以通过尝试在控制台中或使用 API 创建示例状态机来进行验证。IE
{
"Comment": "A Retry example of the Amazon States Language using an AWS Lambda Function",
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Task",
"Resource": "arn:aws:lambda:REGION:ACCOUNT_ID:function:FUNCTION_NAME",
"Retry": [
{
"ErrorEquals": ["CustomError"],
"IntervalSeconds": 99999999,
"MaxAttempts": 99999999,
"BackoffRate": 2.0
},
{
"ErrorEquals": ["States.TaskFailed"],
"IntervalSeconds": 99999999,
"MaxAttempts": 99999999,
"BackoffRate": 2.0
},
{
"ErrorEquals": ["States.ALL"],
"IntervalSeconds": 99999999,
"MaxAttempts": 99999999,
"BackoffRate": 2.0
}
],
"End": true
}
}
}
推荐阅读
- javascript - Discord.js 的角色反应
- python-3.x - Python如何创建一个按钮矩阵并将其放在我的一个框架内
- python - sqlalchemy 中自我引用的一对多父子模型上的 hybrid_property "is_parent"
- scala - 过滤导致 Spark 中数据类型解析问题的行
- authentication - 收到登录消息时,QuickFix 启动器应用程序注销
- x86 - 英特尔架构中的锁语义
- java - mvn jetty:运行失败原因:java.lang.RuntimeException:错误扫描条目META-INF/versions/9/javax/xml/bind/ModuleUtil.class
- linux - 如何重置keytab kerberos?
- python - 如何使用 int8 为 Resnet50v1.5 运行 NVIDIA DeepLearningExamples
- r - 收集具有多个标题行的数据集