Skip to content

Commit 330725e

Browse files
committed
Remove timeout retry handling for sign result fetch from maven upload
1 parent f784b16 commit 330725e

File tree

1 file changed

+5
-27
lines changed

1 file changed

+5
-27
lines changed

charon/pkgs/radas_signature_handler.py

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -105,33 +105,11 @@ def generate_radas_sign(top_level: str, sign_result_loc: str) -> Tuple[List[str]
105105
"""
106106
Generate .asc files based on RADAS sign result json file
107107
"""
108-
conf = get_config()
109-
rconf = conf.get_radas_config() if conf else None
110-
timeout_retry_count = (
111-
rconf.radas_sign_timeout_retry_count() if rconf else DEFAULT_RADAS_SIGN_TIMEOUT_RETRY_COUNT
112-
)
113-
timeout_retry_interval = (
114-
rconf.radas_sign_timeout_retry_interval()
115-
if rconf
116-
else DEFAULT_RADAS_SIGN_TIMEOUT_RETRY_INTERVAL
117-
)
118-
wait_count = 0
119-
120-
# Wait until files appear in the sign_result_loc directory
121-
while True:
122-
files = [
123-
os.path.join(sign_result_loc, f)
124-
for f in os.listdir(sign_result_loc)
125-
if os.path.isfile(os.path.join(sign_result_loc, f))
126-
]
127-
if files: # If files exist, break the loop
128-
break
129-
130-
wait_count += 1
131-
if wait_count > timeout_retry_count:
132-
logger.warning("Timeout when waiting for sign response.")
133-
break
134-
time.sleep(timeout_retry_interval)
108+
files = [
109+
os.path.join(sign_result_loc, f)
110+
for f in os.listdir(sign_result_loc)
111+
if os.path.isfile(os.path.join(sign_result_loc, f))
112+
]
135113

136114
if not files:
137115
return [], []

0 commit comments

Comments
 (0)