From 3a947407fcf1a27a54ac23d7d9fc0becc09d2796 Mon Sep 17 00:00:00 2001 From: Nikita <43146729+gabbhack@users.noreply.github.com> Date: Sun, 10 Mar 2019 22:04:19 +0500 Subject: [PATCH] More "await" in RedisStorage and RedisStorage2 --- aiogram/contrib/fsm_storage/redis.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aiogram/contrib/fsm_storage/redis.py b/aiogram/contrib/fsm_storage/redis.py index 8c1abd90..2bfe1642 100644 --- a/aiogram/contrib/fsm_storage/redis.py +++ b/aiogram/contrib/fsm_storage/redis.py @@ -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]]: """