fix(onboarding): 무진행 구간 UX + 중복 실행 가드
- verifying/manifest 상태(바이트 진행률 없음)에서 인디터미넌트 바 + 친화적 문구 — 9.6GB 검증 ~2분간 멈춘 것처럼 보이던 문제 해소 - OnboardingModal 중복 실행 가드 (runningRef) - LocalLLMService.pullModel: 동일 모델 동시 pull은 기존 promise 합류 - LocalSTTService.downloadModel: /download 409는 실패가 아닌 기존 진행 합류
This commit is contained in:
parent
64c1d3709b
commit
0b9e67afe9
6 changed files with 86 additions and 35 deletions
|
|
@ -327,7 +327,8 @@ class LocalSTTService extends EventEmitter {
|
|||
signal: AbortSignal.timeout(10000),
|
||||
})
|
||||
|
||||
if (!startRes.ok) {
|
||||
// 409 = 이미 다운로드 진행 중 — 실패가 아니라 기존 진행에 합류해 폴링
|
||||
if (!startRes.ok && startRes.status !== 409) {
|
||||
const text = await startRes.text()
|
||||
throw new D3ROError(
|
||||
ErrorCode.STTModelDownloadFailed,
|
||||
|
|
@ -335,10 +336,14 @@ class LocalSTTService extends EventEmitter {
|
|||
)
|
||||
}
|
||||
|
||||
const started = (await startRes.json()) as { status: string }
|
||||
if (started.status === 'done') {
|
||||
this._emitDownloadProgress(modelId, 100, 0, 0, 0)
|
||||
return
|
||||
if (startRes.ok) {
|
||||
const started = (await startRes.json()) as { status: string }
|
||||
if (started.status === 'done') {
|
||||
this._emitDownloadProgress(modelId, 100, 0, 0, 0)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
logger.info(`모델 다운로드 이미 진행 중 — 폴링에 합류: ${modelId}`)
|
||||
}
|
||||
|
||||
// 진행률 폴링 — sidecar 통신 실패가 연속되면 중단
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue