From 02fe5a9d3171af13d310bde73569d7bc32b4d1f8 Mon Sep 17 00:00:00 2001 From: AulonSal Date: Sat, 20 Feb 2021 13:11:29 +0530 Subject: [PATCH] Close Tortoise connections properly --- aerich/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aerich/cli.py b/aerich/cli.py index ba0353f..20fa4a6 100644 --- a/aerich/cli.py +++ b/aerich/cli.py @@ -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