Close Tortoise connections properly

This commit is contained in:
AulonSal
2021-02-20 13:11:29 +05:30
parent be41a1332a
commit 02fe5a9d31

View File

@@ -36,6 +36,7 @@ def coro(f):
def wrapper(*args, **kwargs):
loop = asyncio.get_event_loop()
loop.run_until_complete(f(*args, **kwargs))
loop.run_until_complete(Tortoise.close_connections())
return wrapper