redis-multi-exec-fix-3
This commit is contained in:
parent
25e05381cb
commit
9b1c0ff792
|
@ -11,7 +11,7 @@ class RedisCache:
|
|||
|
||||
async def connect(self):
|
||||
self._redis = aredis.StrictRedis.from_url(self._uri, decode_responses=True)
|
||||
response = await self._redis.execute('PING')
|
||||
response = await self.execute('PING')
|
||||
print(f"[redis] PING response: {response}")
|
||||
|
||||
async def disconnect(self):
|
||||
|
@ -24,8 +24,9 @@ class RedisCache:
|
|||
try:
|
||||
print("[redis] " + command + " " + " ".join(args))
|
||||
return await self._redis.execute_command(command, *args, **kwargs)
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as e:
|
||||
print(f"[redis] error: {e}")
|
||||
return None
|
||||
|
||||
async def subscribe(self, *channels):
|
||||
if not self._redis:
|
||||
|
|
Loading…
Reference in New Issue
Block a user