This commit is contained in:
2024-07-07 13:53:25 +03:00
parent bc2fef91c4
commit 1bb5c6cbbb
2 changed files with 7 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import asyncio
import logging
from datetime import datetime
from redis import asyncio as aioredis
@@ -51,7 +52,7 @@ class BatchLimiter:
await redis.set(key, 1)
await redis.set(f"{key}:start_time", datetime.now().isoformat())
except aioredis.RedisError as e:
print(f"Redis error: {e}")
logging.error(f"Redis error: {e}")
await asyncio.sleep(1)
async def acquire_wildberries(self, key):