def add(self, client):
        """Add a client to the penalty box."""
        if client.pool_id in self._client_ids:
            log.info("%r is already in the penalty box. Ignoring.", client)
            return
        release = time.time() + self._min_wait
        heapq.heappush(self._clients, (release, (client, self._min_wait)))
        self._client_ids.add(client.pool_id)
def add ( self , client ) : if client . pool_id in self . _client_ids : log . info ( "%r is already in the penalty box. Ignoring." , client ) return release = time . time ( ) + self . _min_wait heapq . heappush ( self . _clients , ( release , ( client , self . _min_wait ) ) ) self . _client_ids . add ( client . pool_id )
Add a client to the penalty box.