This commit is contained in:
2023-10-04 01:54:52 +03:00
parent 04c0f3d6e7
commit f8b00cc1b4
6 changed files with 17 additions and 11 deletions

View File

@@ -28,6 +28,15 @@ class RedisCache:
except Exception:
pass
async def execute_pubsub(self, command, *args, **kwargs):
while not self._redis:
await asyncio.sleep(1)
try:
print("[redis] " + command + " " + " ".join(args))
return await self._redis.execute_pubsub(command, *args, **kwargs)
except Exception:
pass
async def subscribe(self, *channels):
if not self._redis:
await self.connect()