from aioredis import (
create_redis_pool
)
class RedisConn:
def __init__(self):
self.conn = None
def set_conn(self, c):
self.conn = c
def get_conn(self):
return self.conn
rdpsc = RedisConn()
async def init_redis_conn():
connection = None
try:
connection = await create_redis_pool(
'redis://localhost:6379',
db=1
)
rdpsc.set_conn(connection)
except Exception as excep:
sentry_sdk.capture_exception(excep)
我在使用await init_redis_conn()
时遇到了这个错误Task was destroyed but it is pending!
,我在Python3.8中使用了aioredis=1.3.1。请帮帮我谢谢
目前没有回答
相关问题 更多 >
编程相关推荐