优化停止任务逻辑
This commit is contained in:
@@ -105,7 +105,6 @@ class FlaskSubprocessManager:
|
||||
|
||||
# 守护线程:把子进程 stdout → LogManager.info/system
|
||||
threading.Thread(target=self._flush_stdout, daemon=True).start()
|
||||
|
||||
LogManager.info(f"Flask 子进程已启动,PID={self.process.pid},端口={self.comm_port}", udid="system")
|
||||
|
||||
if not self._wait_port_open(timeout=10):
|
||||
@@ -122,6 +121,8 @@ class FlaskSubprocessManager:
|
||||
for line in iter(self.process.stdout.readline, ""):
|
||||
if line:
|
||||
LogManager.info(line.rstrip(), udid="system")
|
||||
# 同时输出到控制台
|
||||
print(line.rstrip()) # 打印到主进程的控制台
|
||||
self.process.stdout.close()
|
||||
|
||||
# ---------- 发送 ----------
|
||||
|
||||
Reference in New Issue
Block a user