Skip to content

Commit e61dc7a

Browse files
added inline comments
1 parent 09f6fc0 commit e61dc7a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/unstract/api_deployments/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def _calculate_delay(self, attempt: int) -> float:
137137
exp_delay = min(
138138
self.initial_delay * (self.backoff_factor**attempt), self.max_delay
139139
)
140+
# Full jitter: randomize between 0 and exp_delay to avoid thundering herd
140141
return random.uniform(0, exp_delay)
141142

142143
def _get_retry_delay(self, response, attempt: int) -> float:

0 commit comments

Comments
 (0)