feat: debug
This commit is contained in:
@@ -26,6 +26,7 @@ class BatchLimiter:
|
|||||||
async def acquire(self, key, max_requests, period):
|
async def acquire(self, key, max_requests, period):
|
||||||
redis = await RedisConnectionManager.get_redis_connection()
|
redis = await RedisConnectionManager.get_redis_connection()
|
||||||
while True:
|
while True:
|
||||||
|
logging.info(f'Getting key: {key}')
|
||||||
async with redis.lock(f"{key}_lock"):
|
async with redis.lock(f"{key}_lock"):
|
||||||
try:
|
try:
|
||||||
start_time = await redis.get(f"{key}:start_time")
|
start_time = await redis.get(f"{key}:start_time")
|
||||||
|
|||||||
Reference in New Issue
Block a user