Skip to content

Commit

Permalink
feat: increase magnitude of rate limit step down (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Dec 20, 2024
1 parent 9d969e3 commit 5eafe17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dank_mids/helpers/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5eafe17

Please sign in to comment.