logging-conf-fix2
This commit is contained in:
parent
ced6d12468
commit
57798dc0f7
|
@ -69,11 +69,12 @@ class RedisService:
|
||||||
|
|
||||||
async def scan_iter(self, pattern="*"):
|
async def scan_iter(self, pattern="*"):
|
||||||
"""Asynchronously iterate over keys matching the given pattern."""
|
"""Asynchronously iterate over keys matching the given pattern."""
|
||||||
cursor = "0"
|
if self._client:
|
||||||
while cursor != 0:
|
cursor = "0"
|
||||||
cursor, keys = await self._client.scan(cursor=cursor, match=pattern)
|
while cursor != 0:
|
||||||
for key in keys:
|
cursor, keys = await self._client.scan(cursor=cursor, match=pattern)
|
||||||
yield key
|
for key in keys:
|
||||||
|
yield key
|
||||||
|
|
||||||
async def get(self, key):
|
async def get(self, key):
|
||||||
return await self.execute("get", key)
|
return await self.execute("get", key)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user