kou commented on code in PR #12996:
URL: https://github.com/apache/arrow/pull/12996#discussion_r858475603


##########
dev/archery/archery/crossbow/cli.py:
##########
@@ -339,7 +340,24 @@ def asset_callback(task_name, task, asset):
             path = target_dir / task_name / asset.name
             path.parent.mkdir(exist_ok=True)
             if not dry_run:
-                asset.download(path)
+                import github3
+                max_n_retries = 5
+                n_retries = 0
+                while True:
+                    try:
+                        asset.download(path)
+                    except github3.exceptions.GitHubException as error:
+                        n_retries += 1
+                        if n_retries == max_n_retries:

Review Comment:
   If we use a for loop, no exception is raised when all retries are failed.



-- 
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]

Reply via email to