|
38 | 38 | from clusterfuzz._internal.config import local_config |
39 | 39 | from clusterfuzz._internal.metrics import logs |
40 | 40 | from clusterfuzz._internal.system import environment |
41 | | -from clusterfuzz._internal.system import fast_http |
42 | 41 | from clusterfuzz._internal.system import shell |
43 | 42 |
|
44 | 43 | from . import credentials |
@@ -1248,6 +1247,15 @@ def get_signed_download_url(remote_path, minutes=SIGNED_URL_EXPIRATION_MINUTES): |
1248 | 1247 | return provider.sign_download_url(remote_path, minutes=minutes) |
1249 | 1248 |
|
1250 | 1249 |
|
| 1250 | +def _error_tolerant_download_signed_url_to_file(url_and_path): |
| 1251 | + url, path = url_and_path |
| 1252 | + try: |
| 1253 | + download_signed_url_to_file(url, path) |
| 1254 | + return url |
| 1255 | + except Exception: |
| 1256 | + return None |
| 1257 | + |
| 1258 | + |
1251 | 1259 | def _error_tolerant_upload_signed_url(url_and_path) -> bool: |
1252 | 1260 | url, path = url_and_path |
1253 | 1261 | try: |
@@ -1300,7 +1308,10 @@ def download_signed_urls(signed_urls: List[str], |
1300 | 1308 | for idx in range(len(signed_urls)) |
1301 | 1309 | ] |
1302 | 1310 | logs.info('Downloading URLs.') |
1303 | | - urls = fast_http.download_urls(signed_urls, filepaths) |
| 1311 | + with _pool() as pool: |
| 1312 | + urls = list( |
| 1313 | + pool.map(_error_tolerant_download_signed_url_to_file, |
| 1314 | + zip(signed_urls, filepaths))) |
1304 | 1315 | download_results = [ |
1305 | 1316 | SignedUrlDownloadResult(url, filepaths[idx]) |
1306 | 1317 | for idx, url in enumerate(urls) |
|
0 commit comments