151 config = self.config |
151 config = self.config |
152 self._available_pools = Queue.Queue() |
152 self._available_pools = Queue.Queue() |
153 self._available_pools.put_nowait(pool.ConnectionsPool(self.sources)) |
153 self._available_pools.put_nowait(pool.ConnectionsPool(self.sources)) |
154 if config.quick_start: |
154 if config.quick_start: |
155 # quick start, usually only to get a minimal repository to get cubes |
155 # quick start, usually only to get a minimal repository to get cubes |
156 # information (eg dump/restore/ |
156 # information (eg dump/restore/...) |
157 config._cubes = () |
157 config._cubes = () |
158 self.set_schema(config.load_schema(), resetvreg=False) |
158 # only load hooks and entity classes in the registry |
|
159 config.cube_appobject_path = set(('hooks', 'entities')) |
|
160 config.cubicweb_appobject_path = set(('hooks', 'entities')) |
|
161 self.set_schema(config.load_schema()) |
159 config['connections-pool-size'] = 1 |
162 config['connections-pool-size'] = 1 |
|
163 # will be reinitialized later from cubes found in the database |
160 config._cubes = None |
164 config._cubes = None |
161 elif config.creating: |
165 elif config.creating: |
162 # repository creation |
166 # repository creation |
163 config.bootstrap_cubes() |
167 config.bootstrap_cubes() |
164 self.set_schema(config.load_schema(), resetvreg=False) |
168 self.set_schema(config.load_schema(), resetvreg=False) |
200 self.pools.append(pool.ConnectionsPool(self.sources)) |
204 self.pools.append(pool.ConnectionsPool(self.sources)) |
201 self._available_pools.put_nowait(self.pools[-1]) |
205 self._available_pools.put_nowait(self.pools[-1]) |
202 self._shutting_down = False |
206 self._shutting_down = False |
203 if config.quick_start: |
207 if config.quick_start: |
204 config.init_cubes(self.get_cubes()) |
208 config.init_cubes(self.get_cubes()) |
205 else: |
209 self.hm = self.vreg['hooks'] |
206 self.hm = self.vreg['hooks'] |
|
207 |
210 |
208 # internals ############################################################### |
211 # internals ############################################################### |
209 |
212 |
210 def get_source(self, uri, source_config): |
213 def get_source(self, uri, source_config): |
211 source_config['uri'] = uri |
214 source_config['uri'] = uri |