Skip to content

Commit

Permalink
⚡️ Replace deprecated close connections API
Browse files Browse the repository at this point in the history
  • Loading branch information
SK-415 committed Sep 14, 2022
1 parent f1a3e87 commit 7b0fc89
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 58 deletions.
3 changes: 2 additions & 1 deletion haruka_bot/database/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from nonebot.log import logger
from packaging.version import Version as version_parser
from tortoise import Tortoise
from tortoise.connection import connections

from ..utils import get_path
from ..version import VERSION as HBVERSION
Expand Down Expand Up @@ -257,4 +258,4 @@ async def update_login(cls, tokens):


get_driver().on_startup(DB.init)
get_driver().on_shutdown(Tortoise.close_connections)
get_driver().on_shutdown(connections.close_all)
Loading

0 comments on commit 7b0fc89

Please sign in to comment.