server/repository.py
changeset 8580 d753d6a6798f
parent 8573 ae0a567dff30
child 8592 df16bd045cae
equal deleted inserted replaced
8579:c4673bc11053 8580:d753d6a6798f
   221             config.cubicweb_appobject_path = set(('hooks', 'entities'))
   221             config.cubicweb_appobject_path = set(('hooks', 'entities'))
   222             self.set_schema(config.load_schema())
   222             self.set_schema(config.load_schema())
   223             config['connections-pool-size'] = 1
   223             config['connections-pool-size'] = 1
   224             # will be reinitialized later from cubes found in the database
   224             # will be reinitialized later from cubes found in the database
   225             config._cubes = None
   225             config._cubes = None
   226         elif config.creating:
       
   227             # repository creation
       
   228             config.bootstrap_cubes()
       
   229             # trigger vreg initialisation of entity classes
       
   230             config.cubicweb_appobject_path = set(('hooks', 'entities'))
       
   231             config.cube_appobject_path = set(('hooks', 'entities'))
       
   232             self.set_schema(config.load_schema())
       
   233         elif config.read_instance_schema:
   226         elif config.read_instance_schema:
   234             # normal start: load the instance schema from the database
   227             # normal start: load the instance schema from the database
   235             self.fill_schema()
   228             self.fill_schema()
   236         else:
   229         else:
   237             # test start: use the file system schema (quicker)
   230             if not config.creating:
   238             self.warning("set fs instance'schema")
   231                 # test start: use the file system schema (quicker)
       
   232                 self.warning("set fs instance'schema")
   239             config.bootstrap_cubes()
   233             config.bootstrap_cubes()
   240             self.set_schema(config.load_schema())
   234             self.set_schema(config.load_schema())
   241         if not config.creating:
   235         if not config.creating:
   242             self.init_sources_from_database()
   236             self.init_sources_from_database()
   243             if 'CWProperty' in self.schema:
   237             if 'CWProperty' in self.schema: