[PATCH 10 of 23 cubicweb V2] [database/pool/misc] rename variable to match reality

Laurent Peuch cortex at worlddomination.be
Fri Jan 17 14:37:07 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 7a0fba9908ead8dec818d1ff19ec39b14518066b
# Parent  91a181e23a389fba61012e38dd94df4bb326dcc9
# Available At https://hg.logilab.org/users/lpeuch/cubicweb
#              hg pull https://hg.logilab.org/users/lpeuch/cubicweb -r 7a0fba9908ea
[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
@@ -413,9 +413,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)
@@ -435,7 +435,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:
@@ -467,7 +467,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