mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 12:02:16 +00:00
🎨 在关闭BOT前关闭 sqlmodel
在内存中的所有会话
This commit is contained in:
parent
dd745d5440
commit
5cd072caa9
@ -28,3 +28,6 @@ class MySQL(Service):
|
||||
"""获取会话"""
|
||||
async with self.Session() as session:
|
||||
yield session
|
||||
|
||||
async def stop(self):
|
||||
self.Session.close_all()
|
||||
|
Loading…
Reference in New Issue
Block a user