From c5ceef8acc3cd2f9184b6607f3a6febdff7389fb Mon Sep 17 00:00:00 2001 From: Essem Date: Fri, 29 May 2026 11:50:34 -0500 Subject: [PATCH] fix: Do not exit node clustering implementation when Deno is detected As it turns out, this implementation *does* work on Deno! There are some caveats (e.g. permissions not being preserved in child processes), but it works well enough that blocking it doesn't make much sense. --- src/cluster/node.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/cluster/node.ts b/src/cluster/node.ts index a868f00b..a7b94969 100644 --- a/src/cluster/node.ts +++ b/src/cluster/node.ts @@ -14,11 +14,6 @@ import { } from "./common.ts"; const runtime = detectRuntime(); -if (runtime.type === "deno") { - logger.error("This clustering implementation is incompatible with Deno. Exiting now."); - process.exit(1); -} - const processes: Worker[] = []; const readyHandlers = new Map void>(); @@ -224,7 +219,7 @@ cluster.on("exit", async (worker, code, signal) => { }); cluster.setupPrimary({ - exec: "dist/app.js", + exec: runtime.type === "deno" ? "src/app.ts" : "dist/app.js", serialization: "json", }); -- 2.51.2