def build_all(self): """Builds the entire tree. Returns the number of failures.""" failures = 0 path_cache = PathCache(self.env) # We keep a dummy connection here that does not do anything which # helps us with the WAL handling. See #144 con = self.connect_to_database() try: with reporter.build("build", self): self.env.plugin_controller.emit("before-build-all", builder=self) to_build = self.get_initial_build_queue() while to_build: source = to_build.popleft() prog, build_state = self.build(source, path_cache=path_cache) self.extend_build_queue(to_build, prog) failures += len(build_state.failed_artifacts) self.env.plugin_controller.emit("after-build-all", builder=self) if failures: reporter.report_build_all_failure(failures) return failures finally: con.close()
def build_all(self): """Builds the entire tree. Returns the number of failures.""" failures = 0 path_cache = PathCache(self.env) # We keep a dummy connection here that does not do anything which # helps us with the WAL handling. See #144 con = self.connect_to_database() try: with reporter.build('build', self): self.env.plugin_controller.emit('before-build-all', builder=self) to_build = self.get_initial_build_queue() paraArgs = [] while to_build: # while to_build: source = to_build.popleft() # paraArgs.append({'builder': self, 'source': source, 'path_cache': path_cache}) prog, build_state = self.build( source, path_cache=path_cache) # @@@@@LUKAS parallelize # res = lukas_buildStuff(paraArgs) # @@@@@LUKAS parallelize # for prog, build_state in res: self.extend_build_queue(to_build, prog) failures += len(build_state.failed_artifacts) self.env.plugin_controller.emit('after-build-all', builder=self) if failures: reporter.report_build_all_failure(failures) return failures finally: con.close()
def build_all(self): """Builds the entire tree. Returns the number of failures.""" failures = 0 path_cache = PathCache(self.env) with reporter.build('build', self): self.env.plugin_controller.emit('before-build-all', builder=self) to_build = self.get_initial_build_queue() while to_build: source = to_build.popleft() prog, build_state = self.build(source, path_cache=path_cache) self.extend_build_queue(to_build, prog) failures += len(build_state.failed_artifacts) self.env.plugin_controller.emit('after-build-all', builder=self) if failures: reporter.report_build_all_failure(failures) return failures
def build_all(self): """Builds the entire tree. Returns the number of failures.""" failures = 0 path_cache = PathCache(self.env) # We keep a dummy connection here that does not do anything which # helps us with the WAL handling. See #144 con = self.connect_to_database() try: with reporter.build('build', self): self.env.plugin_controller.emit('before-build-all', builder=self) to_build = self.get_initial_build_queue() while to_build: source = to_build.popleft() prog, build_state = self.build(source, path_cache=path_cache) self.extend_build_queue(to_build, prog) failures += len(build_state.failed_artifacts) self.env.plugin_controller.emit('after-build-all', builder=self) if failures: reporter.report_build_all_failure(failures) return failures finally: con.close()