Skip to content

Commit f00dd63

Browse files
committed
Remove unnused time
1 parent c4d9fc1 commit f00dd63

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

safe_eth/eth/clients/rate_limiter.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
import time
32
from functools import cache
43
from logging import getLogger
54

@@ -17,10 +16,9 @@ def __init__(self, client, rate):
1716
self.client = client
1817
self.rate = rate
1918
self.available_conns = rate # Initialize available conns
20-
self.updated_at = time.monotonic()
2119
self._waiters = [] # List of tasks that are waiting for a connection
2220
self.loop = asyncio.get_event_loop()
23-
self._schedule_next_release_connections() # Schedule first wakeup
21+
self._schedule_next_release_connections() # Schedule first release connections
2422

2523
async def get(self, *args, **kwargs):
2624
await self._wait_for_available_conn()
@@ -32,7 +30,7 @@ async def post(self, *args, **kwargs):
3230

3331
def _wakeup_waiters(self):
3432
"""
35-
Unblock tasks waitting for connections
33+
Unblock tasks waiting for connections
3634
"""
3735
while self.available_conns > 0 and self._waiters:
3836
future = self._waiters.pop(0)

0 commit comments

Comments
 (0)