mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-12 21:05:11 +00:00
Merge branch 'master' into maddyrtc
This commit is contained in:
Generated
BIN
Binary file not shown.
@@ -3,8 +3,13 @@ const cluster = require("cluster");
|
||||
const WebSocket = require("ws");
|
||||
const endpoint = process.env.GATEWAY || "ws://localhost:3001";
|
||||
const connections = Number(process.env.CONNECTIONS) || 50;
|
||||
const threads = Number(process.env.THREADS) || require("os").cpus().length || 1;
|
||||
const token = process.env.TOKEN;
|
||||
var cores = 1;
|
||||
try {
|
||||
cores = Number(process.env.THREADS) || os.cpus().length;
|
||||
} catch {
|
||||
console.log("[Bundle] Failed to get thread count! Using 1...")
|
||||
}
|
||||
|
||||
if (!token) {
|
||||
console.error("TOKEN env var missing");
|
||||
|
||||
+6
-1
@@ -9,7 +9,12 @@ config();
|
||||
import { execSync } from "child_process";
|
||||
|
||||
// TODO: add socket event transmission
|
||||
let cores = Number(process.env.THREADS) || os.cpus().length;
|
||||
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.isMaster) {
|
||||
function getCommitOrFail() {
|
||||
|
||||
+7
-1
@@ -4,7 +4,13 @@ import { red } from "picocolors";
|
||||
|
||||
export function initStats() {
|
||||
console.log(`[Path] running in ${__dirname}`);
|
||||
console.log(`[CPU] ${osu.cpu.model()} Cores x${osu.cpu.count()}`);
|
||||
try {
|
||||
console.log(`[CPU] ${osu.cpu.model()} Cores x${osu.cpu.count()}`);
|
||||
}
|
||||
catch {
|
||||
console.log('[CPU] Failed to get cpu model!')
|
||||
}
|
||||
|
||||
console.log(`[System] ${os.platform()} ${os.arch()}`);
|
||||
console.log(`[Process] running with PID: ${process.pid}`);
|
||||
if (process.getuid && process.getuid() === 0) {
|
||||
|
||||
Reference in New Issue
Block a user