Skip to content

Commit 6ce73b9

Browse files
Merge branch 'main' into bot/update-historical-stdlibs
2 parents 5b9ce8b + 7cd5607 commit 6ce73b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/HistoricalStdlibGenerator/generate_historical_stdlibs.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ num_concurrent_downloads = 8
1616

1717
@info("Downloading versions.json...")
1818
json_buff = IOBuffer()
19-
Downloads.download(versions_json_url, json_buff)
19+
retry(Downloads.download, delays = ExponentialBackOff(n=5))(versions_json_url, json_buff)
2020
versions_json = JSON3.read(String(take!(json_buff)))
2121

2222
# Collect all versions that are >= 1.0.0, and are a stable release
@@ -189,15 +189,15 @@ versions_dict = Dict()
189189
fname = joinpath(scratch_dir, string(url_tag, "-", basename(url)))
190190
if !isfile(fname)
191191
@info("Downloading $(url)")
192-
Downloads.download(url, fname)
192+
retry(Downloads.download, delays = ExponentialBackOff(n=5))(url, fname)
193193
end
194194

195195
if !isempty(hash)
196196
calc_hash = bytes2hex(open(io -> sha256(io), fname, "r"))
197197
if calc_hash != hash
198198
@error("Hash mismatch on $(fname); deleting and re-downloading")
199199
rm(fname; force=true)
200-
Downloads.download(url, fname)
200+
retry(Downloads.download, delays = ExponentialBackOff(n=5))(url, fname)
201201
calc_hash = bytes2hex(open(io -> sha256(io), fname, "r"))
202202
if calc_hash != hash
203203
@error("Hash mismatch on $(fname); re-download failed!")

0 commit comments

Comments
 (0)