You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def validate_retry_params(tries, delay, backoff, max_timeout, max_delay):
"""
Validate retry parameters to ensure the total retry time does not exceed max_timeout.
Args:
tries: Number of retry attempts.
delay: Initial delay between retries in seconds.
backoff: Multiplicative factor for backoff.
max_timeout: Maximum total time for retries in seconds.
max_delay: Maximum delay between retries in seconds.
Raises:
ValueError: If the retry configuration exceeds the maximum timeout.
"""
total_time = 0
current_delay = delay
for attempt in range(tries):
total_time += current_delay
if total_time > max_timeout:
raise ValueError(
f"The retry configuration exceeds the maximum allowed timeout ({max_timeout} seconds) "
f"with the given parameters: tries={tries}, delay={delay}, backoff={backoff}, max_delay={max_delay}."
f"You reached to: {max_timeout} seconds! Please fix it or adjust parameters of retry."
)
E ValueError: The retry configuration exceeds the maximum allowed timeout (14400 seconds) with the given parameters: tries=30, delay=15, backoff=2, max_delay=600.You reached to: 14400 seconds! Please fix it or adjust parameters of retry.
ocs_ci/utility/retry.py:28: ValueError
The text was updated successfully, but these errors were encountered:
tries = 30, delay = 15, backoff = 2, max_timeout = 14400, max_delay = 600
def validate_retry_params(tries, delay, backoff, max_timeout, max_delay):
"""
Validate retry parameters to ensure the total retry time does not exceed max_timeout.
E ValueError: The retry configuration exceeds the maximum allowed timeout (14400 seconds) with the given parameters: tries=30, delay=15, backoff=2, max_delay=600.You reached to: 14400 seconds! Please fix it or adjust parameters of retry.
ocs_ci/utility/retry.py:28: ValueError
The text was updated successfully, but these errors were encountered: