fix: Fixed importing aioredis causing an error in Python 3.11

This commit is contained in:
LWR
2023-05-28 16:23:19 +08:00
parent cfd8a57cee
commit ed0c79b67f

View File

@@ -1,7 +1,7 @@
from typing import Any, Union, Tuple, List, Set
import aioredis
from loguru import logger
from redis import asyncio as aioredis
from ..exception.RedisException import RedisException
from ..utils import config
@@ -32,7 +32,7 @@ async def expire(key: str, seconds: int):
async def exists(key: str) -> bool:
return await __redis.exists(key)
return bool(await __redis.exists(key))
async def get(key: str) -> str: