You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: Aerich commands that interact with the database do not close connections after finishing execution forcing you to manually kill the program.
What steps will reproduce the problem?
Run init-db, downgrade, or any of the other commands that interact with the database with sqlite.
Expected Result
All commands that interact with the database await Tortoise.close_connections() before returning, as recommended in https://tortoise-orm.readthedocs.io/en/latest/setup.html#the-importance-of-cleaning-up,
using an async context manager with with clauses enclosing just the db code or a decorator wrapping the commands, it would be even simpler to just run until complete in the coro decorator.
The text was updated successfully, but these errors were encountered:
AulonSal
changed the title
Multiple aerich commands do not close Tortoise connections
Multiple aerich commands fail to close Tortoise connections
Feb 19, 2021
Problem: Aerich commands that interact with the database do not close connections after finishing execution forcing you to manually kill the program.
What steps will reproduce the problem?
Run init-db, downgrade, or any of the other commands that interact with the database with sqlite.
Expected Result
All commands that interact with the database
await Tortoise.close_connections()
before returning, as recommended in https://tortoise-orm.readthedocs.io/en/latest/setup.html#the-importance-of-cleaning-up,using an async context manager with
with
clauses enclosing just the db code or a decorator wrapping the commands, it would be even simpler to just run until complete in the coro decorator.The text was updated successfully, but these errors were encountered: