cubicweb/server/repository.py
branch3.24
changeset 11819 a85b7a898e13
parent 11811 f09efeead7f9
child 11821 7534b32c45e3
equal deleted inserted replaced
11818:fdc0a8260fd2 11819:a85b7a898e13
   155     entities and relations
   155     entities and relations
   156     """
   156     """
   157 
   157 
   158     def __init__(self, config, tasks_manager=None, vreg=None):
   158     def __init__(self, config, tasks_manager=None, vreg=None):
   159         self.config = config
   159         self.config = config
       
   160         self.sources_by_eid = {}
   160         if vreg is None:
   161         if vreg is None:
   161             vreg = cwvreg.CWRegistryStore(config)
   162             vreg = cwvreg.CWRegistryStore(config)
   162         self.vreg = vreg
   163         self.vreg = vreg
   163         self._tasks_manager = tasks_manager
   164         self._tasks_manager = tasks_manager
   164 
   165 
   262             self._cnxsets_pool.put_nowait(self.cnxsets[-1])
   263             self._cnxsets_pool.put_nowait(self.cnxsets[-1])
   263 
   264 
   264     # internals ###############################################################
   265     # internals ###############################################################
   265 
   266 
   266     def init_sources_from_database(self):
   267     def init_sources_from_database(self):
   267         self.sources_by_eid = {}
       
   268         if self.config.quick_start or 'CWSource' not in self.schema:  # 3.10 migration
   268         if self.config.quick_start or 'CWSource' not in self.schema:  # 3.10 migration
   269             self.system_source.init_creating()
   269             self.system_source.init_creating()
   270             return
   270             return
   271         with self.internal_cnx() as cnx:
   271         with self.internal_cnx() as cnx:
   272             # FIXME: sources should be ordered (add_entity priority)
   272             # FIXME: sources should be ordered (add_entity priority)