equal
deleted
inserted
replaced
239 self.querier = querier.QuerierHelper(self, self.schema) |
239 self.querier = querier.QuerierHelper(self, self.schema) |
240 # cache eid -> type |
240 # cache eid -> type |
241 self._type_cache = {} |
241 self._type_cache = {} |
242 # open some connection sets |
242 # open some connection sets |
243 if bootstrap: |
243 if bootstrap: |
244 self.init_cnxset_pool() |
244 self.bootstrap() |
245 # the hooks manager |
245 # the hooks manager |
246 self.hm = hook.HooksManager(self.vreg) |
246 self.hm = hook.HooksManager(self.vreg) |
247 |
247 |
248 # registry hook to fix user class on registry reload |
248 # registry hook to fix user class on registry reload |
249 @onevent('after-registry-reload', self) |
249 @onevent('after-registry-reload', self) |
254 usercls = self.vreg['etypes'].etype_class('CWUser') |
254 usercls = self.vreg['etypes'].etype_class('CWUser') |
255 for session in self._sessions.values(): |
255 for session in self._sessions.values(): |
256 if not isinstance(session.user, InternalManager): |
256 if not isinstance(session.user, InternalManager): |
257 session.user.__class__ = usercls |
257 session.user.__class__ = usercls |
258 |
258 |
259 def init_cnxset_pool(self): |
259 def bootstrap(self): |
260 """should be called bootstrap_repository, as this is what it does""" |
|
261 self.info('starting repository from %s', self.config.apphome) |
260 self.info('starting repository from %s', self.config.apphome) |
262 config = self.config |
261 config = self.config |
263 # copy pool size here since config.init_cube() and config.load_schema() |
262 # copy pool size here since config.init_cube() and config.load_schema() |
264 # reload configuration from file and could reset a manually set pool |
263 # reload configuration from file and could reset a manually set pool |
265 # size. |
264 # size. |