Recover daemon workers stalled by workspace Git pressure (#3033)
* fix(server): bound workspace git pipelines * fix(server): bound workspace git watcher setup * fix(server): recover unresponsive daemon workers * fix(server): tolerate transient daemon heartbeat delays A five-second watchdog threshold can replace a healthy worker during a short event-loop delay. Keep recovery bounded while allowing a 15-second heartbeat gap, and preserve process-level coverage for workers that ignore graceful termination. * test(server): normalize workspace fixture paths Workspace Git entry points resolve paths before invoking dependencies. Keep admission-control fixtures keyed by the same canonical paths so their assertions and deferred gates work on Windows. --------- Co-authored-by: Timi Ajiboye <trypio00@gmail.com> Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
This commit is contained in:
co-authored by
Timi Ajiboye
Mohamed Boudra
parent
3bca9b7a92
commit
01a1d3b2b6
@@ -38,13 +38,13 @@ export async function terminateWithTreeKill(
|
||||
}
|
||||
|
||||
const exitPromise = waitForProcessExit(child);
|
||||
await signalTreeOrChild(child, options.gracefulSignal ?? "SIGTERM");
|
||||
await signalProcessTree(child, options.gracefulSignal ?? "SIGTERM");
|
||||
if (await waitForExitOrTimeout(exitPromise, options.gracefulTimeoutMs)) {
|
||||
return "terminated";
|
||||
}
|
||||
|
||||
options.onForceSignal?.();
|
||||
await signalTreeOrChild(child, options.forceSignal ?? "SIGKILL");
|
||||
await signalProcessTree(child, options.forceSignal ?? "SIGKILL");
|
||||
if (options.forceTimeoutMs === undefined) {
|
||||
return "killed";
|
||||
}
|
||||
@@ -53,7 +53,7 @@ export async function terminateWithTreeKill(
|
||||
: "kill-timeout";
|
||||
}
|
||||
|
||||
function signalTreeOrChild(child: TreeKillTarget, signal: NodeJS.Signals): Promise<void> {
|
||||
export function signalProcessTree(child: TreeKillTarget, signal: NodeJS.Signals): Promise<void> {
|
||||
if (isProcessExited(child)) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user