From 0d5047169bbd16c733e353300c9b8de101a16b4d Mon Sep 17 00:00:00 2001 From: Nicolas Corthorn Date: Sun, 6 Oct 2024 20:05:47 -0700 Subject: [PATCH] Data update: Improve failure tolerance and retry in price update --- statemachine/update_all_prices.asl.json | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/statemachine/update_all_prices.asl.json b/statemachine/update_all_prices.asl.json index 1ab21b7..cf22c11 100644 --- a/statemachine/update_all_prices.asl.json +++ b/statemachine/update_all_prices.asl.json @@ -12,13 +12,31 @@ "ItemsPath": "$.assets", "MaxConcurrency": 10, "ToleratedFailureCount": 10, - "Iterator": - { + "Iterator": { "StartAt": "Update Prices", "States": { "Update Prices": { "Type": "Task", "Resource": "${UpdatePricesFunctionArn}", + "Retry": [ + { + "ErrorEquals": ["States.ALL"], + "IntervalSeconds": 60, + "MaxAttempts": 5, + "BackoffRate": 2 + } + ], + "Catch": [ + { + "ErrorEquals": ["States.ALL"], + "ResultPath": "$.errorInfo", + "Next": "Proceed After Failure" + } + ], + "End": true + }, + "Proceed After Failure": { + "Type": "Pass", "End": true } }