mirror of
https://github.com/spacebarchat/server.git
synced 2026-09-01 20:09:01 +00:00
Set default threads to 1. Multiple threads is broken without Rabbitmq
This commit is contained in:
+1
-7
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user