添加如果流不存在则关闭时候报错

This commit is contained in:
孙小云 2025-04-02 16:46:00 +08:00
parent 4779c1b1bc
commit 5a569084b8
1 changed files with 3 additions and 1 deletions

View File

@ -186,8 +186,10 @@ public class TaskService implements ITaskService{
for (StreamProcess streamProcess : currentStreamTask.getStreamProcesses()) { for (StreamProcess streamProcess : currentStreamTask.getStreamProcesses()) {
if(!new File(streamProcess.getFileName()).exists()){ if(!new File(streamProcess.getFileName()).exists()){
recordSuccess = false; recordSuccess = false;
} logger.error("流录制失败: streamUrl {} taskId {} destroy Process {}", streamUrl,currentStreamTask.getTaskId() ,streamProcess.getInnerProcessId());
}else {
logger.info("streamUrl {} taskId {} destroy Process {}", streamUrl,currentStreamTask.getTaskId() ,streamProcess.getInnerProcessId()); logger.info("streamUrl {} taskId {} destroy Process {}", streamUrl,currentStreamTask.getTaskId() ,streamProcess.getInnerProcessId());
}
streamProcess.destroy(); streamProcess.destroy();
} }
} }