fix(capture-manager): raise readFirstStderrLine timeout 35s->300s for flock queue

With 8 deltacast bridges serializing via flock (each holding the lock
for ~35s during signal wait + settle), the last bridge in queue waits
~280s before getting the lock. The 35s readFirstStderrLine timeout was
firing before those bridges could even open the board, causing them to
fail silently while the bridge was still queued. 300s (5min) covers
8 bridges * 35s each with margin.
This commit is contained in:
Zac Gaetano 2026-06-01 23:23:07 +00:00
parent eba8e94887
commit 6979f07307

View file

@ -10,7 +10,7 @@ import { createUploadStream } from './s3/client.js';
* Rejects if the process exits with a non-zero code before emitting a line,
* or if timeoutMs elapses.
*/
function readFirstStderrLine(proc, timeoutMs = 35_000) {
function readFirstStderrLine(proc, timeoutMs = 300_000) {
return new Promise((resolve, reject) => {
let buf = '';
let settled = false;
@ -614,7 +614,7 @@ class CaptureManager {
'--signal-timeout', '30',
], { stdio: ['ignore', 'pipe', 'pipe'] });
const fmt = await readFirstStderrLine(bridge, 35_000);
const fmt = await readFirstStderrLine(bridge, 300_000);
bridge.stderr.on('data', (d) => console.error(`[deltacast-bridge] ${d.toString().trimEnd()}`));
return {