kou commented on code in PR #15090:
URL: https://github.com/apache/arrow/pull/15090#discussion_r1056996576
##########
dev/release/download_rc_binaries.py:
##########
@@ -190,12 +192,18 @@ def _download_file(self, dest, asset):
print("Already downloaded", dest_path)
return
- return self._download_url(
+ delay = random.randint(0, 3)
+ print(f"Waiting {delay} seconds to avoid rate limit")
+ time.sleep(delay)
+
+ self._download_url(
url,
dest_path,
extra_args=[
"--header",
"Accept: application/octet-stream",
+ # Also retry 403s
+ "--retry-all-errors",
Review Comment:
It seems that we need to specify `--retry N` too:
https://curl.se/docs/manpage.html#--retry-all-errors
> Retry on any error. This option is used together with
[--retry](https://curl.se/docs/manpage.html#--retry).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]