Skip to content

Commit 83a92f9

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

File tree

1 file changed

+5
-30
lines changed

1 file changed

+5
-30
lines changed

charon/pkgs/radas_signature_handler.py

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@
1919
import os
2020
import asyncio
2121
import sys
22-
import time
2322
from typing import List, Any, Tuple, Callable, Dict
2423
from charon.config import get_config
25-
from charon.constants import DEFAULT_RADAS_SIGN_TIMEOUT_RETRY_COUNT
26-
from charon.constants import DEFAULT_RADAS_SIGN_TIMEOUT_RETRY_INTERVAL
2724
from charon.pkgs.oras_client import OrasClient
2825
from proton import Event
2926
from proton.handlers import MessagingHandler
@@ -105,33 +102,11 @@ def generate_radas_sign(top_level: str, sign_result_loc: str) -> Tuple[List[str]
105102
"""
106103
Generate .asc files based on RADAS sign result json file
107104
"""
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)
105+
files = [
106+
os.path.join(sign_result_loc, f)
107+
for f in os.listdir(sign_result_loc)
108+
if os.path.isfile(os.path.join(sign_result_loc, f))
109+
]
135110

136111
if not files:
137112
return [], []

0 commit comments

Comments
 (0)