def run(self, runtime): annotator = StaticAnnotator() for registration in Format.read(self['config']): candidate = self['specifications'] / registration['id'].replace(':', '_') if candidate.exists(): registration['specification'] = eval(candidate.bytes()) annotator.process(registration) ENTITY_API.attach(annotator.generate_mounts()) runtime.execute('mesh.javascript', path=self['path'], bundle=ENTITY_API)
def bootstrap(self): from docket.bundles import ENTITY_API session = self.schema.session for registration in session.query(Registration).options(undefer('specification')): model = self.models[registration.id] = self._construct_model(registration) self.annotator.process(registration, model) session.commit() ENTITY_API.attach(self.annotator.generate_mounts())
def bootstrap(self): from docket.bundles import ENTITY_API session = self.schema.session for registration in session.query(Registration).options( undefer('specification')): model = self.models[registration.id] = self._construct_model( registration) self.annotator.process(registration, model) session.commit() ENTITY_API.attach(self.annotator.generate_mounts())
def run(self, runtime): annotator = StaticAnnotator() for registration in Format.read(self['config']): candidate = self['specifications'] / registration['id'].replace( ':', '_') if candidate.exists(): registration['specification'] = eval(candidate.bytes()) annotator.process(registration) ENTITY_API.attach(annotator.generate_mounts()) runtime.execute('mesh.javascript', path=self['path'], bundle=ENTITY_API)