forked from FOSS/ASF-Control-Bot
feat(bot): add async DB and FSM state handling
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
|
||||
|
||||
from bot.config import DATABASE_URL
|
||||
|
||||
engine = create_async_engine(DATABASE_URL)
|
||||
async_session = async_sessionmaker(engine, expire_on_commit=False, class_=AsyncSession)
|
||||
Reference in New Issue
Block a user