utils/rate_limit.py
def _cleanup(self, now):
        """Remove keys that are expired (older than t + cooldown)"""
        expired_keys = [k for k, t in self.cache.items() if (now - t) >= self.cooldown]
        for key in expired_keys:
            del self.cache[key]
Remove keys that are expired (older than t + cooldown)
Remove keys that are expired (older than t + cooldown)
Remove keys that are expired ( older than t + cooldown )
def _cleanup(self, now):
        expired_keys = [k for k, t in self.cache.items() if (now - t) >= self.cooldown]
        for key in expired_keys:
            del self.cache[key]
def _cleanup ( self , now ) : expired_keys = [ k for k , t in self . cache . items ( ) if ( now - t ) >= self . cooldown ] for key in expired_keys : del self . cache [ key ]
Remove keys that are expired (older than t + cooldown)
Remove keys that are expired ( older than t + cooldown )
"""Remove keys that are expired (older than t + cooldown)"""
self
now