server/repository.py
changeset 2881 d1a5b77e42bc
parent 2880 bfc8e1831290
child 2893 5989ce0707bc
equal deleted inserted replaced
2880:bfc8e1831290 2881:d1a5b77e42bc
   234         self.querier.set_schema(schema)
   234         self.querier.set_schema(schema)
   235         for source in self.sources:
   235         for source in self.sources:
   236             source.set_schema(schema)
   236             source.set_schema(schema)
   237         self.schema = schema
   237         self.schema = schema
   238         if resetvreg:
   238         if resetvreg:
       
   239             if self.config._cubes is None:
       
   240                 self.config.init_cubes(self.get_cubes())
   239             # full reload of all appobjects
   241             # full reload of all appobjects
   240             self.vreg.reset()
   242             self.vreg.reset()
   241             self.vreg.set_schema(schema)
   243             self.vreg.set_schema(schema)
   242 
   244 
   243     def fill_schema(self):
   245     def fill_schema(self):
   260                                 (ex.args and ex.args[0].strip() or 'unknown')), \
   262                                 (ex.args and ex.args[0].strip() or 'unknown')), \
   261                                 None, sys.exc_info()[-1]
   263                                 None, sys.exc_info()[-1]
   262         finally:
   264         finally:
   263             session.close()
   265             session.close()
   264         self.set_schema(appschema)
   266         self.set_schema(appschema)
   265         self.config.init_cubes(self.get_cubes())
       
   266 
   267 
   267     def start_looping_tasks(self):
   268     def start_looping_tasks(self):
   268         assert isinstance(self._looping_tasks, list), 'already started'
   269         assert isinstance(self._looping_tasks, list), 'already started'
   269         for i, (interval, func, args) in enumerate(self._looping_tasks):
   270         for i, (interval, func, args) in enumerate(self._looping_tasks):
   270             self._looping_tasks[i] = task = utils.LoopTask(interval, func, args)
   271             self._looping_tasks[i] = task = utils.LoopTask(interval, func, args)