Skip to content

Commit 9982cb7

Browse files
authored
Merge pull request #20 from mboudet/master
Fix connection closed error for big files when loading interproscan
2 parents 1b4551f + e9211ac commit 9982cb7

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
uses: actions/checkout@v2
99
- uses: actions/setup-python@v1
1010
with:
11-
python-version: 3.7
11+
python-version: 3.8
1212
- name: Install flake8
1313
run: pip install flake8 flake8-import-order
1414
- name: Flake8
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
python-version: [3.7]
21+
python-version: [3.8]
2222
tripal: [0, 1]
2323
steps:
2424
- name: Checkout
@@ -53,7 +53,7 @@ jobs:
5353
uses: actions/checkout@v2
5454
- uses: actions/setup-python@v1
5555
with:
56-
python-version: 3.7
56+
python-version: 3.8
5757
- name: Python install
5858
run: pip install -U pip setuptools nose build
5959
- name: Build a binary wheel and a source tarball

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ $ chakin feature load_fasta \
8787
8888
## History
8989
90+
- 2.3.8
91+
- Fix connection closed error when loading big interproscan files
92+
9093
- 2.3.7
9194
- Fix loading of expression data when first column header is not empty
9295

chado/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ def __init__(self, dbhost="localhost", dbname="chado", dbuser="chado", dbpass="c
5454
engine_url = 'postgresql://%s:%s@%s:%s/%s' % (self.dbuser, self.dbpass, self.dbhost, self.dbport, self.dbname)
5555

5656
if pool_connections:
57-
self._engine = create_engine(engine_url)
57+
self._engine = create_engine(engine_url, pool_pre_ping=True, connect_args={
58+
"keepalives": 1,
59+
"keepalives_idle": 30,
60+
"keepalives_interval": 10,
61+
})
5862
else:
5963
# Prevent SQLAlchemy to make a connection pool.
6064
# Useful for galaxy dynamic options as otherwise it triggers "sorry, too many clients already" errors after a while

setup.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name="chado",
9-
version='2.3.7',
9+
version='2.3.8',
1010
description="Chado library",
1111
author="Anthony Bretaudeau",
1212
author_email="anthony.bretaudeau@inrae.fr",
@@ -25,10 +25,5 @@
2525
"License :: OSI Approved :: MIT License",
2626
"Operating System :: OS Independent",
2727
"Topic :: Scientific/Engineering",
28-
"Programming Language :: Python :: 2",
29-
"Programming Language :: Python :: 2.7",
30-
"Programming Language :: Python :: 3.4",
31-
"Programming Language :: Python :: 3.5",
32-
"Programming Language :: Python :: 3.6",
33-
"Programming Language :: Python :: 3.7",
28+
"Programming Language :: Python :: 3.8",
3429
])

0 commit comments

Comments
 (0)