summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-08 19:54:10 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-08 19:54:10 +0100
commit7fa00a9e4f2723f7d93fc1ecc8369ccbbc9e4f76 (patch)
treebcd0a21dfdd7ad0021e605ec57c5b8f13ec65257
parent6197a42598db3233b76c41a1f4fb2b443eb04495 (diff)
downloadjoblib-7fa00a9e4f2723f7d93fc1ecc8369ccbbc9e4f76.tar.gz
joblib-7fa00a9e4f2723f7d93fc1ecc8369ccbbc9e4f76.zip
init pool with only 1 db conn
-rw-r--r--joblib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/joblib.py b/joblib.py
index 0e0cc41..53a34c1 100644
--- a/joblib.py
+++ b/joblib.py
@@ -15,7 +15,8 @@ class JobQueue(object):
logging.info("connecting to queue database")
while True:
try:
- self._pool = await asyncpg.create_pool(**args)
+ self._pool = await asyncpg.create_pool(
+ min_size=1, **args)
break
except asyncpg.exceptions.CannotConnectNowError:
logging.warning(