Skip to content

Commit

Permalink
make fsm use bot_id for multi-bot deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
Forden committed Jun 16, 2023
1 parent e470393 commit 5a6a999
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aiogram_bot_template/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from aiogram import Bot, Dispatcher
from aiogram.client.session.aiohttp import AiohttpSession
from aiogram.client.telegram import TelegramAPIServer
from aiogram.fsm.storage.redis import RedisStorage
from aiogram.fsm.storage.redis import RedisStorage, DefaultKeyBuilder
from aiohttp import web
from redis.asyncio import Redis
from tenacity import _utils
Expand Down Expand Up @@ -303,7 +303,8 @@ def main() -> None:
password=config.FSM_PASSWORD,
port=config.FSM_PORT,
db=0,
)
),
key_builder=DefaultKeyBuilder(with_bot_id=True),
)
)

Expand Down

0 comments on commit 5a6a999

Please sign in to comment.