Skip to content

Commit

Permalink
fix: increase retry attempts for file downloads
Browse files Browse the repository at this point in the history
Enhanced the robustness of the `download_keys.sh` script by increasing the maximum number of retry attempts from 5 to 100 when downloading files.
  • Loading branch information
sergeytimoshin committed Dec 4, 2024
1 parent fb5b7a7 commit 3579ae7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions light-prover/scripts/download_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ download_file() {
echo "Downloading $FILE"
[ "$REMOTE_SIZE" -ne 0 ] && echo "Expected size: $REMOTE_SIZE bytes"

local MAX_RETRIES=5
local MAX_RETRIES=100
local attempt=0
while (( attempt < MAX_RETRIES )); do
if curl -S -f --retry 3 --retry-delay 2 --connect-timeout 30 \
Expand Down Expand Up @@ -92,7 +92,7 @@ download_file() {
fi

echo "Download failed for $FILE (attempt $((attempt + 1))). Retrying..."
sleep $((2 ** attempt)) # Exponential backoff
sleep $((2 ** attempt))
((attempt++))
done

Expand Down

0 comments on commit 3579ae7

Please sign in to comment.