[server] Rename Repository's init_cnxset_pool method bootstrap
authorDenis Laxalde <denis.laxalde@logilab.fr>
Thu, 23 Feb 2017 17:47:18 +0100
changeset 11981 56e99b59272f
parent 11980 7c8aadc4b483
child 11982 8d1525c76e65
[server] Rename Repository's init_cnxset_pool method bootstrap See the (removed) docstring for a rationale...
cubicweb/server/migractions.py
cubicweb/server/repository.py
--- a/cubicweb/server/migractions.py	Thu Feb 23 17:45:50 2017 +0100
+++ b/cubicweb/server/migractions.py	Thu Feb 23 17:47:18 2017 +0100
@@ -278,7 +278,7 @@
                 raise SystemExit(1)
         shutil.rmtree(tmpdir)
         # call hooks
-        repo.init_cnxset_pool()
+        repo.bootstrap()
         repo.hm.call_hooks('server_restore', repo=repo, timestamp=backupfile)
         print('-> database restored.')
 
--- a/cubicweb/server/repository.py	Thu Feb 23 17:45:50 2017 +0100
+++ b/cubicweb/server/repository.py	Thu Feb 23 17:47:18 2017 +0100
@@ -241,7 +241,7 @@
         self._type_cache = {}
         # open some connection sets
         if bootstrap:
-            self.init_cnxset_pool()
+            self.bootstrap()
         # the hooks manager
         self.hm = hook.HooksManager(self.vreg)
 
@@ -256,8 +256,7 @@
                 if not isinstance(session.user, InternalManager):
                     session.user.__class__ = usercls
 
-    def init_cnxset_pool(self):
-        """should be called bootstrap_repository, as this is what it does"""
+    def bootstrap(self):
         self.info('starting repository from %s', self.config.apphome)
         config = self.config
         # copy pool size here since config.init_cube() and config.load_schema()