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:
@@ -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}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user