mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
More "await" in RedisStorage and RedisStorage2
This commit is contained in:
parent
843be46d19
commit
3a947407fc
1 changed files with 4 additions and 4 deletions
|
|
@ -173,10 +173,10 @@ class RedisStorage(BaseStorage):
|
|||
conn = await self.redis()
|
||||
|
||||
if full:
|
||||
conn.execute('FLUSHDB')
|
||||
await conn.execute('FLUSHDB')
|
||||
else:
|
||||
keys = await conn.execute('KEYS', 'fsm:*')
|
||||
conn.execute('DEL', *keys)
|
||||
await conn.execute('DEL', *keys)
|
||||
|
||||
def has_bucket(self):
|
||||
return True
|
||||
|
|
@ -350,10 +350,10 @@ class RedisStorage2(BaseStorage):
|
|||
conn = await self.redis()
|
||||
|
||||
if full:
|
||||
conn.flushdb()
|
||||
await conn.flushdb()
|
||||
else:
|
||||
keys = await conn.keys(self.generate_key('*'))
|
||||
conn.delete(*keys)
|
||||
await conn.delete(*keys)
|
||||
|
||||
async def get_states_list(self) -> typing.List[typing.Tuple[int]]:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue