From be0624821b893e9b135af257a6a38afdbf10a4b6 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Thu, 21 Aug 2025 15:11:13 +0800 Subject: [PATCH] 'commit' --- dsLightRag/static/Suno/music_progress.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dsLightRag/static/Suno/music_progress.html b/dsLightRag/static/Suno/music_progress.html index 0a91ee28..97f68e60 100644 --- a/dsLightRag/static/Suno/music_progress.html +++ b/dsLightRag/static/Suno/music_progress.html @@ -124,7 +124,7 @@ statusMessage.innerHTML += ` (已等待${elapsedTime}秒)`; // 任务完成 - if (responseData.status === 'completed') { + if (responseData.status === 'completed' || responseData.status === 'complete') { statusMessage.innerHTML = ' 音乐生成完成!'; statusMessage.style.backgroundColor = '#e8f5e9'; statusMessage.style.borderColor = '#a5d6a7'; @@ -151,8 +151,10 @@ }) .catch(error => { console.error('检查任务状态失败:', error); - // 出现错误时也继续查询 - timerId = setTimeout(checkTaskStatus, queryInterval); + // 只有在任务未完成且未超时时才继续查询 + if (queryCount < maxQueries && !isTaskCompleted) { + timerId = setTimeout(checkTaskStatus, queryInterval); + } }); }