@@ -16,7 +16,7 @@ num_concurrent_downloads = 8
1616
1717@info (" Downloading versions.json..." )
1818json_buff = IOBuffer ()
19- Downloads. download (versions_json_url, json_buff)
19+ retry ( Downloads. download, delays = ExponentialBackOff (n = 5 )) (versions_json_url, json_buff)
2020versions_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