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

Laurent Peuch cortex at worlddomination.be
Tue Jan 7 13:30:38 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 41efc8a1933cb72b35ee0c66f017bf36aa848050
# Parent  bddfd2048b195bc2c8d791ce940ec0b7bb387ba9
# Available At https://hg.logilab.org/users/lpeuch/cubicweb
#              hg pull https://hg.logilab.org/users/lpeuch/cubicweb -r 41efc8a1933c
[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,12 +372,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()
@@ -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
-            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