fix(progress): separate model warmup state
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -124,13 +124,16 @@ async function runJob(
|
||||
|
||||
// ── 4. Submit to whisper with webhook ────────────────────────────────
|
||||
setJobStatus(jobId, 'transcribing', 10);
|
||||
emitProgress(jobId, { type: 'status', status: 'transcribing' });
|
||||
emitProgress(jobId, { type: 'status', status: 'transcribing', progress: 10 });
|
||||
|
||||
const webhookUrl = `${WEBHOOK_BASE_URL}/api/webhook/${jobId}`;
|
||||
const whisperJobId = await submitJob(wavPath, webhookUrl, language, (state, retryAfterSecs) => {
|
||||
emitProgress(jobId, { type: 'model_warming', state, retryAfterSecs });
|
||||
setJobStatus(jobId, 'warming_model', 10);
|
||||
emitProgress(jobId, { type: 'model_warming', status: 'warming_model', state, retryAfterSecs, progress: 10 });
|
||||
});
|
||||
updateJob({ id: jobId, whisperJobId });
|
||||
setJobStatus(jobId, 'transcribing', 10);
|
||||
emitProgress(jobId, { type: 'status', status: 'transcribing', progress: 10 });
|
||||
|
||||
// ── 5. Open SSE for live progress (non-blocking relay) ───────────────
|
||||
streamJob(
|
||||
|
||||
Reference in New Issue
Block a user