部分小问题的修改

This commit is contained in:
2025-05-20 17:03:14 +08:00
parent 6dd18ae1e0
commit 86c6669593
7 changed files with 32 additions and 17 deletions

View File

@ -8,7 +8,6 @@ from apps.business.project import models as proj_models, crud as proj_crud
import yaml
import asyncio
import subprocess
from redis.asyncio import Redis
from sqlalchemy.ext.asyncio import AsyncSession
@ -171,7 +170,7 @@ async def run_commend(
while process.poll() is None:
line = process.stdout.readline()
process.stdout.flush() # 刷新缓存,防止缓存过多造成卡死
if line != '\n' and '0%' not in line:
if line != '\n' and '0%' not in line and 'yolo' not in line:
await room_manager.send_to_room(room, line + '\n')
# 等待进程结束并获取返回码