Merge pull request #269 from jtraub/dev
Close connections in the init_db wrapper
This commit is contained in:
commit
90943a473c
@ -30,7 +30,7 @@ def coro(f):
|
|||||||
try:
|
try:
|
||||||
loop.run_until_complete(f(*args, **kwargs))
|
loop.run_until_complete(f(*args, **kwargs))
|
||||||
finally:
|
finally:
|
||||||
if f.__name__ not in ["cli", "init_db", "init"]:
|
if f.__name__ not in ["cli", "init"]:
|
||||||
loop.run_until_complete(Tortoise.close_connections())
|
loop.run_until_complete(Tortoise.close_connections())
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
Loading…
x
Reference in New Issue
Block a user