From 5eafe175db128e5e38e6b07dc722861edb399c09 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Thu, 19 Dec 2024 22:27:02 -0400 Subject: [PATCH] feat: increase magnitude of rate limit step down (#337) --- dank_mids/helpers/_session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dank_mids/helpers/_session.py b/dank_mids/helpers/_session.py index 13075b24..48ab9c0d 100644 --- a/dank_mids/helpers/_session.py +++ b/dank_mids/helpers/_session.py @@ -228,7 +228,7 @@ async def handle_too_many_requests(self, endpoint: str, error: ClientResponseErr limiter = limiters[endpoint] if (now := time()) > getattr(limiter, "_last_updated_at", 0) + 60: current_rate = limiter._rate_per_sec - new_rate = current_rate * 0.99 + new_rate = current_rate * 0.97 limiter._rate_per_sec = new_rate limiter._last_updated_at = now _logger_info(