Skip to content

Commit

Permalink
Merge pull request #20 from mboudet/master
Browse files Browse the repository at this point in the history
Fix connection closed error for big files when loading interproscan
  • Loading branch information
abretaud committed Mar 9, 2022
2 parents 1b4551f + e9211ac commit 9982cb7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.8
- name: Install flake8
run: pip install flake8 flake8-import-order
- name: Flake8
Expand All @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: [3.8]
tripal: [0, 1]
steps:
- name: Checkout
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.8
- name: Python install
run: pip install -U pip setuptools nose build
- name: Build a binary wheel and a source tarball
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ $ chakin feature load_fasta \
## History
- 2.3.8
- Fix connection closed error when loading big interproscan files
- 2.3.7
- Fix loading of expression data when first column header is not empty
Expand Down
6 changes: 5 additions & 1 deletion chado/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ def __init__(self, dbhost="localhost", dbname="chado", dbuser="chado", dbpass="c
engine_url = 'postgresql://%s:%s@%s:%s/%s' % (self.dbuser, self.dbpass, self.dbhost, self.dbport, self.dbname)

if pool_connections:
self._engine = create_engine(engine_url)
self._engine = create_engine(engine_url, pool_pre_ping=True, connect_args={
"keepalives": 1,
"keepalives_idle": 30,
"keepalives_interval": 10,
})
else:
# Prevent SQLAlchemy to make a connection pool.
# Useful for galaxy dynamic options as otherwise it triggers "sorry, too many clients already" errors after a while
Expand Down
9 changes: 2 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="chado",
version='2.3.7',
version='2.3.8',
description="Chado library",
author="Anthony Bretaudeau",
author_email="[email protected]",
Expand All @@ -25,10 +25,5 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
])

0 comments on commit 9982cb7

Please sign in to comment.