mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-12 21:52:40 +01:00
Set default threads to 1. Multiple threads is broken without Rabbitmq
This commit is contained in:
parent
2771e06166
commit
99a3c65588
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user