summaryrefslogtreecommitdiff
path: root/api.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-08 18:20:09 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-08 18:20:09 +0100
commit89e738064e061c9d555a18c519c4dfa41e8ac589 (patch)
treeb216bceb4fbce5cba27ebec70c056f422675e56e /api.py
parent9b080a9c1041eeccee58696e6fe080c67b94d103 (diff)
downloadapigrabber-89e738064e061c9d555a18c519c4dfa41e8ac589.tar.gz
apigrabber-89e738064e061c9d555a18c519c4dfa41e8ac589.zip
start with only 1 db connection
Diffstat (limited to 'api.py')
-rw-r--r--api.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/api.py b/api.py
index 2bb37a1..cfbcbb8 100644
--- a/api.py
+++ b/api.py
@@ -21,7 +21,8 @@ class Apigrabber(joblib.worker.Worker):
"""Connect to database."""
logging.warning("connecting to database")
await super().connect(**args)
- self._pool = await asyncpg.create_pool(**args)
+ self._pool = await asyncpg.create_pool(min_size=1,
+ **args)
async def setup(self):
"""Initialize the database."""