datacube-core
datacube-core copied to clipboard
Fix premature connection closure
Reason for this pull request
On servers that aggressively close idle connections (e.g. NCI), the connection is sometimes closed prematurely when combining db calls with file io or writing to logs.
Proposed changes
-
Connection.execution_options
doesn't modify the connection in-place until sqlalchemy 2.0; make current implementation compatible with both 1.4 and 2.0 -
Don't set connection isolation level to autocommit when calling
_connect
, as it is already set on the engine level -
[ ] Closes #xxxx
-
[ ] Tests added / passed
-
[ ] Fully documented, including
docs/about/whats_new.rst
for all changes
📚 Documentation preview 📚: https://datacube-core--1525.org.readthedocs.build/en/1525/