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 ec5807723b
commit 303b1255fa

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