Skip to content

Commit 020565c

Browse files
committed
Handle dev process pool shutdown errors
1 parent 58d56f8 commit 020565c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/cli-v3/src/dev/devSupervisor.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import pLimit from "p-limit";
2626
import { resolveLocalEnvVars } from "../utilities/localEnvVars.js";
2727
import type { Metafile } from "esbuild";
2828
import { TaskRunProcessPool } from "./taskRunProcessPool.js";
29+
import { tryCatch } from "@trigger.dev/core/utils";
2930

3031
export type WorkerRuntimeOptions = {
3132
name: string | undefined;
@@ -149,7 +150,13 @@ class DevSupervisor implements WorkerRuntime {
149150

150151
// Shutdown the task run process pool
151152
if (this.taskRunProcessPool) {
152-
await this.taskRunProcessPool.shutdown();
153+
const [shutdownError] = await tryCatch(this.taskRunProcessPool.shutdown());
154+
155+
if (shutdownError) {
156+
logger.debug("[DevSupervisor] shutdown, task run process pool failed to shutdown", {
157+
error: shutdownError,
158+
});
159+
}
153160
}
154161
}
155162

0 commit comments

Comments
 (0)