Job 1788248174330

Command: powershell -NoProfile -Command "$files=@('C:\ProgramData\AudioProcess\current\chirp_dashboard_server.py','C:\ProgramData\AudioProcess\current\chirp_direct_server.py');foreach($f in $files){Write-Output ('---'+$f+'---');Select-String -Path $f -Pattern 'do_POST|do_GET|/api/|submit|enqueue|create_job|source_path|input_path|file_path' -CaseSensitive:$false | Select-Object -First 160 | ForEach-Object {('{0}:{1}' -f $_.LineNumber,$_.Line.Trim())}}"
Directory: projects
Status: SUCCESS
Exit code: 0

Cancel Job Rerun Command Refresh

---C:\ProgramData\AudioProcess\current\chirp_dashboard_server.py---
180:"url": f"/api/models/file/{urllib.parse.quote(candidate.name)}",
689:elif status in {"chirp_uploading", "chirp_submitted", "chirp_polling"}:
825:active_chunks = int(sum(c.get(x, 0) for x in ("chirp_uploading", "chirp_submitted", "chirp_polling")))
901:active_chunks = sum(c.get(x, 0) for x in ("chirp_uploading", "chirp_submitted", "chirp_polling"))
955:active = int(counts.get("chirp_uploading", 0) + counts.get("chirp_submitted", 0) + counts.get("chirp_polling", 0))
1029:"chirp_submitted": 35.0,
1057:active_statuses = {"chirp_uploading", "chirp_submitted", "chirp_polling", "external_processing", "chirp_retry", "chirp_parked_stale", "chirp_failed", "need_resplit"}
1093:"chirp_submitted": "processing",
1172:active = int(chunk_counts.get("chirp_uploading", 0) + chunk_counts.get("chirp_submitted", 0) + chunk_counts.get("chirp_polling", 0) + chunk_counts.get("external_processing", 0))
1277:active_chunks = int(local_counts.get("chirp_uploading", 0) + local_counts.get("chirp_submitted", 0) + local_counts.get("chirp_polling", 0))
1337:active_chunks = int(local_counts.get("chirp_uploading", 0) + local_counts.get("chirp_submitted", 0) + local_counts.get("chirp_polling", 0))
1385:if status in {"chirp_uploading", "chirp_submitted", "chirp_polling"}:
2275:body{{font-family:system-ui;background:#101114;color:#eee;min-height:100vh;margin:0;display:grid;place-items:center}}.box{{width:min(92vw,380px);background:#202228;padding:24px;border-radius:14px;box-sizing:border-box}}h1{{font-size:1.35rem;margin:0 0 18px}}label{{display:block;margin:12px 0 5px}}input{{width:100%;box-sizing:border-box;padding:11px;border:1px solid #555;border-radius:8px;background:#111319;color:#fff;font-size:1rem}}button{{width:100%;margin-top:18px;padding:11px;border:0;border-radius:8px;font-size:1rem;font-weight:700;cursor:pointer}}.error{{background:#5b2020;color:#ffd7d7;padding:9px;border-radius:8px;margin-bottom:12px}}</style></head><body><form class="box" method="post" action="/login"><h1>{title}</h1>{err}<label>Username</label><input name="username" autocomplete="username" required autofocus><label>Password</label><input name="password" type="password" autocomplete="current-password" required><button type="submit">Sign in</button></form></body></html>'''
2310:async function action(name, confirmIt = false, word = '') { if (confirmIt && !confirm(word || 'Confirm action?')) return; try { let d = await api('/api/admin/action', { action: name }); notify(name + ' dihantar'); if (name === 'restart') pageStatus.textContent = 'Service sedang restart...'; setTimeout(load, 1200); return d; } catch (x) { notify(x.message, true); } }
2366:pageStatus.textContent = loadStarted ? 'Menyegar /api/dashboard...' : 'Memuatkan /api/dashboard...';
2369:let r = await fetch('/api/dashboard?x=' + Date.now(), { cache: 'no-store', credentials: 'same-origin', signal: ctrl.signal }), d = await r.json();
2424:async function action(name) { try { await api('/api/admin/action', { action: name }); notify(name + ' dihantar'); load(); } catch (x) { notify(x.message, true); } }
2427:let r = await fetch('/api/jellyfin'), d = await r.json();
2440:def do_GET(self) -> None:
2471:if path == "/api/dashboard":
2475:if path == "/api/admin/update-status":
2479:if path == "/api/jellyfin":
2490:if path == "/api/admin/diagnostic-report.zip":
2496:if self.host.processor_queue is not None and path in {"/api/summary", "/api/worker-config"}:
2501:if path == "/api/summary" else self.host.processor_queue.worker_config()
2505:if self.host.processor_queue is not None and path == "/api/models/manifest":
2517:model_match = re.fullmatch(r"/api/models/file/([^/]+)", path)
2527:if self.host.processor_queue is not None and path == "/api/processor-update/manifest":
2544:"url": f"/api/processor-update/file/{platform}",
2550:update_match = re.fullmatch(r"/api/processor-update/file/(android|windows)", path)
2561:job_match = re.fullmatch(r"/api/jobs/([0-9a-f]{24})/(audio-status|audio\.wav)", path)
2571:if path == "/api/admin/completed-english-subtitles.xlsx":
2576:file_path = self.host.app.completed_english_xlsx_path
2577:if not file_path.exists():
2582:file_path.read_bytes(),
2592:def do_POST(self) -> None:
2609:if queue is not None and path == "/api/register":
2612:if queue is not None and path.startswith("/api/") and not path.startswith("/api/admin/"):
2617:if path == "/api/claim":
2621:if path in {"/api/device/report", "/api/device/monitor"}:
2624:if path == "/api/device/resource-control":
2627:match = re.fullmatch(r"/api/jobs/([0-9a-f]{24})/(prepare|heartbeat|status|fail|subtitle)", path)
2655:if path == "/api/admin/queue-recover":
2660:if path == "/api/admin/providers-reset-safe":
2665:if path == "/api/admin/rerun-all-word-timestamps":
2670:if path == "/api/admin/recover-progress":
2675:if path == "/api/admin/audit-chirp-srt-batches":
2680:if path == "/api/admin/audit-subtitle-gaps":
2685:if path == "/api/admin/recover-latest-chirp-batch":
2690:if path == "/api/admin/purge-non-chirp-subtitles":
2695:if path == "/api/admin/rerun-all-word-timestamps-dry-run":
2699:if path == "/api/admin/action":
2704:if path == "/api/admin/settings":
2707:if path == "/api/admin/upload-update":
---C:\ProgramData\AudioProcess\current\chirp_direct_server.py---
1005:"UPDATE audio_chunks SET status='audio_ready',progress=20,detail='Stopped by dashboard: transcribe held before submit',worker_id=NULL,processing_started_at=NULL,next_retry=0,error=NULL,updated_at=? "
1093:submitting the same long audio again.
1413:"WHERE status IN ('chirp_submitted','chirp_polling') AND COALESCE(operation_name,'')<>''",
1703:self.update_job(job_id, status="transcribing", progress=9, detail="Upload selesai; submit Chirp 3 batch", error=None)
1736:self.update_job(job_id, status="transcribing", progress=10, detail=f"Chirp batch submitted; tunggu result (op {short_name})", error=None)
1737:logging.info("Chirp batch submitted job=%s operation=%s", job_id, name)
1807:running = sum(counts.get(x, 0) for x in ("chirp_uploading", "chirp_submitted", "chirp_polling"))
1988:def submit_chirp_operation(self, gcs_uri: str) -> str:
2229:self.update_chunk(chunk_id, status="chirp_submitted", progress=35, detail="Upload selesai; submit Chirp", gcs_uri=gcs_uri, error=None)
2231:operation_name = self.submit_chirp_operation(gcs_uri)
2236:detail=f"Chirp submitted (op {short_name})", operation_name=operation_name,
2240:self.update_job_from_chunks(job_id, f"submitted {short_name}")
2503:MAX(CASE WHEN c.status IN ('chirp_uploading','chirp_submitted','chirp_polling') THEN 1 ELSE 0 END) AS has_active,
2504:MIN(CASE WHEN c.status IN ('chirp_uploading','chirp_submitted','chirp_polling')
2507:MIN(CASE WHEN c.status IN ('audio_ready','chirp_retry','chirp_submitted','chirp_polling','chirp_uploading')
2515:AND c.status IN ('audio_ready','chirp_retry','chirp_submitted','chirp_polling','chirp_uploading')
2553:AND c.status IN ('audio_ready','chirp_retry','chirp_submitted','chirp_polling')
3246:input_path = work_dir / f"argos-{request_id}.input.json"
3250:atomic_write(input_path, json.dumps(payload, ensure_ascii=False).encode("utf-8"))
3288:proc.stdin.write(str(input_path) + "\n")
3336:for cleanup_path in (input_path, output_path):
3403:for cleanup_path in (input_path, output_path):
3434:on each /api/dashboard request.  If Windows Python/py launcher is slow or
4487:"SELECT * FROM audio_chunks WHERE job_id=? AND status IN ('audio_ready','chirp_retry','chirp_submitted','chirp_polling') ORDER BY chunk_index LIMIT 1",
4989:"UPDATE audio_chunks SET status='audio_ready',progress=20,detail='Safe recovery: stale Google operation parked; chunk requeued for fresh Chirp submit',operation_name=NULL,gcs_uri=NULL,gcs_object=NULL,worker_id=NULL,processing_started_at=NULL,next_retry=0,error=NULL,updated_at=? WHERE chunk_id=?",
4993:"UPDATE jobs SET status='transcribing',detail='Safe recovery: parked Chirp chunk requeued for fresh submit',error=NULL,updated_at=? WHERE job_id=?",
5037:"SELECT * FROM audio_chunks WHERE status IN ('chirp_uploading','chirp_submitted','chirp_polling') AND COALESCE(operation_name,'')<>''"
5099:# Chunks claimed but never submitted can safely be returned to queue.
5110:"UPDATE audio_chunks SET status='audio_ready',progress=20,detail='Safe recovery: stale pre-submit Chirp claim released',worker_id=NULL,processing_started_at=NULL,next_retry=0,error=NULL,updated_at=? WHERE chunk_id=?",
5114:summary["items"].append({"kind": "chirp", "chunk_id": row["chunk_id"], "job_id": row["job_id"], "action": "release_pre_submit_claim", "age_seconds": int(age)})