debug: yt-dlp/ffmpeg capture stderr'ını GET /debug/capture/:sessionId ile görünür kıl

İlk gerçek capture denemesi 2 saniyede sessionı bitirdi (0 segment) —
Coolify /logs endpoint'i api-daemon'un stdout'unu güvenilir şekilde
izole edemediği için sebebi göremedik. Artık her session'ın son
yt-dlp/ffmpeg stderr satırları bellekte tutulup HTTP'den okunabiliyor.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-30 17:45:36 +03:00
co-authored by Claude Sonnet 5
parent 19fe430549
commit 08569ce4ae
2 changed files with 29 additions and 3 deletions
+5
View File
@@ -2,6 +2,7 @@ import express from "express";
import { prisma } from "@streamclipper/db";
import { env } from "./env";
import { lastPollErrors } from "./youtubePolling";
import { lastCaptureDebug } from "./capture/streamIngest";
export function startServer() {
const app = express();
@@ -32,6 +33,10 @@ export function startServer() {
});
});
app.get("/debug/capture/:sessionId", (req, res) => {
res.json({ lines: lastCaptureDebug.get(req.params.sessionId) ?? [] });
});
app.listen(env.port, () => {
console.log(`[server] api-daemon listening on :${env.port}`);
});