Skip to content

Commit 8fd6a5d

Browse files
moar
1 parent a8854b5 commit 8fd6a5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

workos/utils/_base_http_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,13 @@ def _calculate_backoff_delay(
237237
The delay in seconds to wait before the next retry
238238
"""
239239
# Exponential backoff: base_delay * 2^attempt
240-
delay = retry_config.base_delay * (2**attempt)
240+
delay: float = retry_config.base_delay * (2**attempt)
241241

242242
# Cap at max_delay
243243
delay = min(delay, retry_config.max_delay)
244244

245245
# Add jitter: random variation of 0-25% of delay
246-
jitter_amount = delay * retry_config.jitter * random.random()
246+
jitter_amount: float = delay * retry_config.jitter * random.random()
247247
return delay + jitter_amount
248248

249249
def _should_retry_exception(self, exc: Exception) -> bool:

0 commit comments

Comments
 (0)