This one had me tearing out my hair for a few hours since I'm still new to Tortoise. If you are using Aerich through the Command class (as mentioned here in the Readme), it doesn't close the Tortoise connections when done, preventing the event loop from properly closing. It isn't immediately obvious that this needs to be done because the developer isn't setting up or managing the Tortoise class themselves here.
I think either Aerich should close the connection for the developer or we should add to the docs that the developer needs to do await Tortoise.close_connections() when they are closing the application.
This one had me tearing out my hair for a few hours since I'm still new to Tortoise. If you are using Aerich through the Command class (as mentioned here in the Readme), it doesn't close the Tortoise connections when done, preventing the event loop from properly closing. It isn't immediately obvious that this needs to be done because the developer isn't setting up or managing the Tortoise class themselves here.
I think either Aerich should close the connection for the developer or we should add to the docs that the developer needs to do
await Tortoise.close_connections()
when they are closing the application.