From e27fe79d51e7d7a993fe7fb608046820f2c30210 Mon Sep 17 00:00:00 2001 From: liferoad Date: Sat, 25 Jan 2025 14:28:07 -0500 Subject: [PATCH] optimize pulling the license --- sdks/java/container/license_scripts/pull_licenses_java.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdks/java/container/license_scripts/pull_licenses_java.py b/sdks/java/container/license_scripts/pull_licenses_java.py index 61d36d3bac10..e076930f3471 100644 --- a/sdks/java/container/license_scripts/pull_licenses_java.py +++ b/sdks/java/container/license_scripts/pull_licenses_java.py @@ -39,17 +39,17 @@ from urllib.request import urlopen, Request, URLError, HTTPError SOURCE_CODE_REQUIRED_LICENSES = ['lgpl', 'gpl', 'cddl', 'mpl', 'gnu', 'mozilla public license'] -RETRY_NUM = 9 -THREADS = 16 +RETRY_NUM = 12 +THREADS = 8 -# workaround of a breaking change introduced in tenacity 8.5+ +# workaround of a breaking change introduced in tenacity 8.5+ # See https://github.com/jd/tenacity/issues/486 def resolve_retry_number(retried_fn): return retried_fn.retry.statistics.get("attempt_number") or \ retried_fn.statistics.get("attempt_number") @retry(reraise=True, - wait=wait_fixed(5), + wait=wait_fixed(10), stop=stop_after_attempt(RETRY_NUM)) def pull_from_url(file_name, url, dep, no_list): if url == 'skip':