Set default threads to 1. Multiple threads is broken without Rabbitmq
This commit is contained in:
parent
ec5807723b
commit
303b1255fa
@ -9,13 +9,7 @@ import { config } from "dotenv";
|
|||||||
config();
|
config();
|
||||||
import { execSync } from "child_process";
|
import { execSync } from "child_process";
|
||||||
|
|
||||||
// TODO: add socket event transmission
|
const cores = process.env.THREADS ? parseInt(process.env.THREADS) : 1;
|
||||||
var cores = 1;
|
|
||||||
try {
|
|
||||||
cores = Number(process.env.THREADS) || os.cpus().length;
|
|
||||||
} catch {
|
|
||||||
console.log("[API] Failed to get thread count! Using 1...");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cluster.isPrimary) {
|
if (cluster.isPrimary) {
|
||||||
function getCommitOrFail() {
|
function getCommitOrFail() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user