diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts
index 71a60d49..bc1d7cbc 100644
--- a/bundle/src/Server.ts
+++ b/bundle/src/Server.ts
@@ -50,20 +50,20 @@ async function main() {
endpointPublic: `ws://localhost:${port}`,
}),
},
- // regions: {
- // default: "fosscord",
- // useDefaultAsOptimal: true,
- // available: [
- // {
- // id: "fosscord",
- // name: "Fosscord",
- // endpoint: "127.0.0.1:3001",
- // vip: false,
- // custom: false,
- // deprecated: false,
- // },
- // ],
- // },
+ regions: {
+ default: "fosscord",
+ useDefaultAsOptimal: true,
+ available: [
+ {
+ id: "fosscord",
+ name: "Fosscord",
+ endpoint: "127.0.0.1:3004",
+ vip: false,
+ custom: false,
+ deprecated: false,
+ },
+ ],
+ },
} as any);
//Sentry
diff --git a/bundle/src/start.ts b/bundle/src/start.ts
index 7660b296..de3b5848 100644
--- a/bundle/src/start.ts
+++ b/bundle/src/start.ts
@@ -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() {
diff --git a/bundle/src/stats.ts b/bundle/src/stats.ts
index 3c5163c3..0234e0b4 100644
--- a/bundle/src/stats.ts
+++ b/bundle/src/stats.ts
@@ -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) {
|