mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add note about redis package
This commit is contained in:
parent
74e1380337
commit
1ca83f083f
1 changed files with 8 additions and 3 deletions
|
|
@ -1,5 +1,3 @@
|
|||
from contextlib import suppress
|
||||
|
||||
from .base import BaseEventIsolation, BaseStorage, StorageKey
|
||||
from .memory import (
|
||||
DisabledEventIsolation,
|
||||
|
|
@ -8,8 +6,15 @@ from .memory import (
|
|||
SimpleEventIsolation,
|
||||
)
|
||||
|
||||
with suppress(ModuleNotFoundError):
|
||||
try:
|
||||
from .redis import DefaultKeyBuilder, KeyBuilder, RedisEventIsolation, RedisStorage
|
||||
except ModuleNotFoundError:
|
||||
from aiogram import loggers
|
||||
|
||||
loggers.dispatcher.warning(
|
||||
msg="NOTE that Redis package should be installed to use RedisStorage"
|
||||
)
|
||||
|
||||
|
||||
__all__ = (
|
||||
"StorageKey",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue