Closed TheGU closed 3 years ago
Try to solve the same issue with #364 but different approach. Not sure which one should be use in which case. In this PR, I just want to close local connection to make sure dispose process work like expect. However, #364 track all connection then close all of them when call close() function.
After test and investigate why dataset not release db connection, even after call close() or engine.dispose(), from below note.
https://dataset.readthedocs.io/en/latest/api.html#notes
I found that because it still has connection open. From sqlalchemy document.
and code comment sqlalchemy/engine/base.py#L48
it's need to call .close() for any open connection to make sure connection close.