From 5cd072caa9e7ccd7ac012d2c164fa97043cd55d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Mon, 26 Sep 2022 16:52:17 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E5=9C=A8=E5=85=B3=E9=97=ADBOT?= =?UTF-8?q?=E5=89=8D=E5=85=B3=E9=97=AD=20`sqlmodel`=20=E5=9C=A8=E5=86=85?= =?UTF-8?q?=E5=AD=98=E4=B8=AD=E7=9A=84=E6=89=80=E6=9C=89=E4=BC=9A=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/base/mysql.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/base/mysql.py b/core/base/mysql.py index fd7d90e..1b89813 100644 --- a/core/base/mysql.py +++ b/core/base/mysql.py @@ -28,3 +28,6 @@ class MySQL(Service): """获取会话""" async with self.Session() as session: yield session + + async def stop(self): + self.Session.close_all()