1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Import aioredis from redis module too

aioredis is available in redis-py as of version 4.2.0rc1: https://github.com/aio-libs/aioredis-py#-aioredis-is-now-in-redis-py-420rc1-
Try importing from the new package as well.
This commit is contained in:
Ananth Bhaskararaman 2022-08-28 17:32:56 +05:30 committed by GitHub
parent b8214d32d5
commit b86c38367a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,10 @@ redis_installed = True
try: try:
import aioredis import aioredis
except: except:
redis_installed = False try:
from redis import asyncio as aioredis
except:
redis_installed = False
class StateRedisStorage(StateStorageBase): class StateRedisStorage(StateStorageBase):