From 99a3c6558839634e88b25bb82cb1eee0a32b65c2 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Tue, 20 Dec 2022 22:45:42 +1100 Subject: Set default threads to 1. Multiple threads is broken without Rabbitmq --- src/bundle/start.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/bundle/start.ts b/src/bundle/start.ts index cac75960..ad5bc836 100644 --- a/src/bundle/start.ts +++ b/src/bundle/start.ts @@ -9,13 +9,7 @@ import { config } from "dotenv"; config(); import { execSync } from "child_process"; -// TODO: add socket event transmission -var cores = 1; -try { - cores = Number(process.env.THREADS) || os.cpus().length; -} catch { - console.log("[API] Failed to get thread count! Using 1..."); -} +const cores = process.env.THREADS ? parseInt(process.env.THREADS) : 1; if (cluster.isPrimary) { function getCommitOrFail() { -- cgit 1.4.1