diff --git a/src/start.ts b/src/start.ts
index a20581c3..cf1a42a5 100644
--- a/src/start.ts
+++ b/src/start.ts
@@ -1,19 +1,19 @@
// process.env.MONGOMS_DEBUG = "true";
-import "reflect-metadata";
+import { execSync } from "child_process";
import cluster, { Worker } from "cluster";
+import { config } from "dotenv";
import os from "os";
-import { red, bold, yellow, cyan } from "picocolors";
+import { bold, cyan, red, yellow } from "picocolors";
+import "reflect-metadata";
import { initStats } from "./stats";
-import { config } from "dotenv";
config();
-import { execSync } from "child_process";
// TODO: add socket event transmission
let cores = 1;
try {
cores = Number(process.env.THREADS) || os.cpus().length;
} catch {
- console.log("[API] Failed to get thread count! Using 1...")
+ console.log("[API] Failed to get thread count! Using 1...");
}
if (cluster.isMaster) {
@@ -35,19 +35,9 @@ if (cluster.isMaster) {
██║ ╚██████╔╝███████║███████║╚██████╗╚██████╔╝██║ ██║██████╔╝
╚═╝ ╚═════╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝
- fosscord-server | ${yellow(
- `Pre-release (${
- commit !== null
- ? commit.slice(0, 7)
- : "Unknown (Git cannot be found)"
- })`
- )}
+ fosscord-server | ${yellow(`Pre-release (${commit !== null ? commit.slice(0, 7) : "Unknown (Git cannot be found)"})`)}
-Commit Hash: ${
- commit !== null
- ? `${cyan(commit)} (${yellow(commit.slice(0, 7))})`
- : "Unknown (Git cannot be found)"
- }
+Commit Hash: ${commit !== null ? `${cyan(commit)} (${yellow(commit.slice(0, 7))})` : "Unknown (Git cannot be found)"}
Cores: ${cyan(os.cpus().length)} (Using ${cores} thread(s).)
`)
);
@@ -84,11 +74,7 @@ Cores: ${cyan(os.cpus().length)} (Using ${cores} thread(s).)
});
cluster.on("exit", (worker: any, code: any, signal: any) => {
- console.log(
- `[Worker] ${red(
- `died with PID: ${worker.process.pid} , restarting ...`
- )}`
- );
+ console.log(`[Worker] ${red(`died with PID: ${worker.process.pid} , restarting ...`)}`);
cluster.fork();
});
}
|