From 2edc9dec3884d59a873dc8193443511621f319af Mon Sep 17 00:00:00 2001 From: mihalin Date: Fri, 10 Sep 2021 22:42:47 +0300 Subject: [PATCH] test --- server/custom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/custom.py b/server/custom.py index fca37a8..388e78a 100644 --- a/server/custom.py +++ b/server/custom.py @@ -5,21 +5,21 @@ from aiogram import exceptions from aiogram import types from contextvars import ContextVar from aiohttp.web_exceptions import HTTPNotFound -import aioredis +from aioredis.commands import create_redis_pool +from aioredis import Redis import typing as ty from olgram.settings import ServerSettings - from olgram.models.models import Bot db_bot_instance: ContextVar[Bot] = ContextVar('db_bot_instance') -_redis: ty.Optional[aioredis.Redis] = None +_redis: ty.Optional[Redis] = None async def init_redis(): global _redis - _redis = await aioredis.create_redis_pool(ServerSettings.redis_path()) + _redis = await create_redis_pool(ServerSettings.redis_path()) def _message_unique_id(bot_id: int, message_id: int) -> str: