1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-13 22:23:47 +01:00

Set default threads to 1. Multiple threads is broken without Rabbitmq

This commit is contained in:
Madeline 2022-12-20 22:45:42 +11:00
parent 2771e06166
commit 99a3c65588
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -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() {