Skip to content

Commit 8cb59b1

Browse files
committed
Adjust retry times
1 parent 532274a commit 8cb59b1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,20 @@ runs:
7474
$OutFile
7575
)
7676
77-
$maxRetries = 3
77+
$maxRetries = 5
7878
$retryCount = 0
79+
$delay = 2
7980
$success = $false
8081
8182
while (-not $success -and $retryCount -lt $maxRetries) {
8283
try {
8384
Invoke-WebRequest -Uri $Uri -OutFile $OutFile
84-
$success = $true
85+
# $success = $true
8586
} catch [System.Net.WebException] {
8687
Write-Output "Attempt $($retryCount + 1) failed. Retrying..."
87-
Start-Sleep -Seconds 3
88+
Start-Sleep -Seconds $delay
8889
$retryCount++
90+
$delay += $delay
8991
}
9092
}
9193

0 commit comments

Comments
 (0)