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

Laurent Peuch cortex at worlddomination.be
Fri Jan 17 14:37:08 CET 2020


# HG changeset patch
# User Laurent Peuch <cortex at worlddomination.be>
# Date 1578392901 -3600
#      Tue Jan 07 11:28:21 2020 +0100
# Node ID 01724c9a1b9443365572051667245cd77f32ccf0
# Parent  7a0fba9908ead8dec818d1ff19ec39b14518066b
# Available At https://hg.logilab.org/users/lpeuch/cubicweb
#              hg pull https://hg.logilab.org/users/lpeuch/cubicweb -r 01724c9a1b94
[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,12 +413,12 @@ class Repository(object):
         # reload configuration from file and could reset a manually set pool
         # size.
         if config['connections-pooler-enabled']:
-            max_pool_size, min_pool_size = config['connections-pool-size'], 1
+            max_pool_size, cw_init_phase_max_pool_size = config['connections-pool-size'], 1
         else:
-            max_pool_size = min_pool_size = None
+            max_pool_size = cw_init_phase_max_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)
+        self.cnxsets = _CnxSetPool(self.system_source, cw_init_phase_max_pool_size)
         # 1. set used cubes
         if config.creating or not config.read_instance_schema:
             config.bootstrap_cubes()
@@ -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
-            max_pool_size = min_pool_size
+            max_pool_size = cw_init_phase_max_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:



More information about the cubicweb-devel mailing list