RazerM / ratelimiter

Simple Python module providing rate limiting
Apache License 2.0
122 stars 29 forks source link

Changed algorithm #20

Open holasoftware opened 1 year ago

holasoftware commented 1 year ago

If len(self.calls) >= max_calls and the last call is long time ago, the algorithm is awaiting unnecessarily.

Based on the comments in this thread https://github.com/RazerM/ratelimiter/issues/15