a34cccb 9b2dc95 a34cccb 9b2dc95
1
2
3
4
5
6
import asyncio def exponential_backoff(attempt: int, base: float = 1.0, max_delay: float = 30.0): delay = min(base * (2 ** attempt), max_delay) return delay