We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04ef310 commit cd69290Copy full SHA for cd69290
1 file changed
scripts/cat-s3.sh
@@ -11,7 +11,7 @@ local_copy=$(mktemp)
11
local_concatenated=$(mktemp)
12
n_failures=0
13
14
-while (( n_failures < 2 )); do
+while (( n_failures < 5 )); do
15
current_etag=$(aws s3api head-object --bucket "$bucket" --key "$key" --query ETag --output text)
16
if [[ "$current_etag" == "null" ]]; then
17
echo "Failed to retrieve ETag. Exiting."
@@ -39,6 +39,8 @@ while (( n_failures < 2 )); do
39
aws s3api put-object --bucket "$bucket" --key "$key" --body "$local_concatenated" --if-match "$current_etag" || {
40
echo "ETag does not match during upload. Trying again."
41
n_failures=$(( n_failures + 1 ))
42
+ # wait for before retrying
43
+ sleep 0.1
44
continue
45
}
46
0 commit comments