| 130 | self._process_bar.update(1) |
| 131 | |
| 132 | def run(self, tool_lists): |
| 133 | tool_name_list = [info["tool_dirname"] for info in tool_lists] |
| 134 | tools_count = len(tool_name_list) |
| 135 | # LogPrinter.info("Initialize tools: %s" % ", ".join(tool_name_list)) |
| 136 | LogPrinter.info(f"Initing {tools_count} tools, please wait a minute ...") |
| 137 | |
| 138 | self._process_bar = tqdm(total=tools_count, desc="[Tools init]", ncols=100) |
| 139 | |
| 140 | min_t = 20 |
| 141 | max_t = 1000 |
| 142 | callback_queue = CallbackQueue(min_threads=min_t, max_threads=max_t) |
| 143 | for tool_info in tool_lists: |
| 144 | callback_queue.append(self.__load_tool_callback__, tool_info) |
| 145 | callback_queue.wait_for_all_callbacks_to_be_execute_and_destroy() |
| 146 | self._process_bar.close() |
| 147 | return self._error_list |
| 148 | |
| 149 | |
| 150 | class ConfigUtil(object): |