检查输出文件大小,返回 (大小, 是否超限)
(self)
| 702 | self._running = False |
| 703 | |
| 704 | def check_size(self) -> Tuple[int, bool]: |
| 705 | """检查输出文件大小,返回 (大小, 是否超限)""" |
| 706 | try: |
| 707 | size = os.path.getsize(self.output_path) |
| 708 | return size, size > self.max_size |
| 709 | except FileNotFoundError: |
| 710 | return 0, False |
| 711 | |
| 712 | def kill_process_tree(self, pid: int): |
| 713 | """杀死进程树 — 不只是主进程,还有所有子进程""" |
nothing calls this directly
no outgoing calls
no test coverage detected