diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-20 22:45:42 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-20 22:45:42 +1100 |
commit | 303b1255fa61a2dd91212f43f776bae3275c9ff3 (patch) | |
tree | 04081de7c71679902f6c1da0cba656fbfedcea8b | |
parent | Add back various docs/readme (diff) | |
download | server-303b1255fa61a2dd91212f43f776bae3275c9ff3.tar.xz |
Set default threads to 1. Multiple threads is broken without Rabbitmq
-rw-r--r-- | src/bundle/start.ts | 8 |
1 files changed, 1 insertions, 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() { |