From 7fa00a9e4f2723f7d93fc1ecc8369ccbbc9e4f76 Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 8 Mar 2017 19:54:10 +0100 Subject: init pool with only 1 db conn --- joblib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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( -- cgit v1.3.1