Skip to content

Commit c7784c6

Browse files
committed
wait random expo
1 parent a4f2a64 commit c7784c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/service-library/src/servicelib/redis/_semaphore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
retry_if_not_result,
2020
stop_after_delay,
2121
stop_never,
22-
wait_fixed,
22+
wait_random_exponential,
2323
)
2424

2525
from ._client import RedisClientSDK
@@ -169,7 +169,7 @@ async def acquire(self) -> bool:
169169

170170
# Blocking
171171
@retry(
172-
wait=wait_fixed(0.5),
172+
wait=wait_random_exponential(min=0.1, max=2),
173173
reraise=True,
174174
stop=(
175175
stop_after_delay(self.blocking_timeout.total_seconds())

0 commit comments

Comments
 (0)