Skip to content

Commit

Permalink
try to use NullPool to fix idle connection issue (#121)
Browse files Browse the repository at this point in the history
* try to use NullPool to fix idle connection issue

* omit session.rollback

* add engine.dispose again

* Bump versions of pre-commit tools

* Delete old ixmp version of transport tutorial

---------

Co-authored-by: Fridolin Glatter <[email protected]>
  • Loading branch information
meksor and glatterf42 authored Oct 17, 2024
1 parent 45bb224 commit e3ee9c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 472 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.12.0
hooks:
- id: mypy
entry: bash -c "poetry run mypy ."
language: system
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.3
rev: v0.6.9
hooks:
- id: ruff
- id: ruff-format
Expand Down
2 changes: 1 addition & 1 deletion ixmp4/data/backend/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

@lru_cache()
def cached_create_engine(dsn: str) -> Engine:
return create_engine(dsn, pool_pre_ping=True)
return create_engine(dsn, poolclass=NullPool)


class IamcSubobject(BaseIamcSubobject):
Expand Down
Loading

0 comments on commit e3ee9c8

Please sign in to comment.