示例#1
0
    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)
示例#2
0
    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())
示例#3
0
    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())
示例#4
0
    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)