Conversation
|
Is there anything blocking this from being merged? Deprecation concerns? It's been almost 1 year. |
|
Hi @yxtay ,
The correct thing to do is to leave the implementation of |
| result = self.max | ||
| return max(0, min(result, self.max)) | ||
| result = super().__call__(retry_state) + random.uniform(0, self.jitter) | ||
| return max(self.min, min(result, self.max)) |
There was a problem hiding this comment.
the min part should be equal to max(0, self.min) (in case self.min is negative + follow same formula as wait_exponential)
|
👋 I was just looking at implementing the Would it make sense to split those commits off to be merged while @LotfiRafik 's comments are addressed? |
Summary
Improves wait_exponential_jitter to inherit wait_exponential
- Reuses
wait_exponential.__call__method instead of of duplicating code- Follows argument names of wait_exponential
- Adds
minargument- Supports supplying
max,jitter,minarguments astimedeltaTests