[PATCH 02 of 12 cubicweb] [database/pool/misc] rename variable to match reality

Laurent Peuch cortex at worlddomination.be
Tue Jan 7 13:30:37 CET 2020


# HG changeset patch
# User Laurent Peuch <cortex at worlddomination.be>
# Date 1578392835 -3600
#      Tue Jan 07 11:27:15 2020 +0100
# Node ID bddfd2048b195bc2c8d791ce940ec0b7bb387ba9
# Parent  1b4e75114ad5762a217e2a3afc3eb926d4e61c66
# Available At https://hg.logilab.org/users/lpeuch/cubicweb
#              hg pull https://hg.logilab.org/users/lpeuch/cubicweb -r bddfd2048b19
[database/pool/misc] rename variable to match reality

diff --git a/cubicweb/server/repository.py b/cubicweb/server/repository.py
--- a/cubicweb/server/repository.py
+++ b/cubicweb/server/repository.py
@@ -372,9 +372,9 @@ class Repository(object):
         # reload configuration from file and could reset a manually set pool
         # size.
         if config['connections-pooler-enabled']:
-            pool_size, min_pool_size = config['connections-pool-size'], 1
+            max_pool_size, min_pool_size = config['connections-pool-size'], 1
         else:
-            pool_size = min_pool_size = None
+            max_pool_size = min_pool_size = None
         # 0. init a cnxset that will be used to fetch bootstrap information from
         #    the database
         self.cnxsets = _CnxSetPool(self.system_source, min_pool_size)
@@ -394,7 +394,7 @@ class Repository(object):
             config.cube_appobject_path = set(('hooks', 'entities'))
             config.cubicweb_appobject_path = set(('hooks', 'entities'))
             # limit connections pool size
-            pool_size = min_pool_size
+            max_pool_size = min_pool_size
         if config.quick_start or config.creating or not config.read_instance_schema:
             # load schema from the file system
             if not config.creating:
@@ -426,7 +426,7 @@ class Repository(object):
         # 4. close initialization connection set and reopen fresh ones for
         #    proper initialization
         self.cnxsets.close()
-        self.cnxsets = _CnxSetPool(self.system_source, pool_size)
+        self.cnxsets = _CnxSetPool(self.system_source, max_pool_size)
         # 5. call instance level initialisation hooks
         self.hm.call_hooks('server_startup', repo=self)
 



More information about the cubicweb-devel mailing list