summary refs log tree commit diff
path: root/bundle
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-07-18 18:30:53 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-09 23:28:27 +0200
commite536fb2f72e4883979b451b60b12c44f5f94313c (patch)
tree9c7fccb12c5aeec560d3c223a3b6e969e8d95cd9 /bundle
parentUpdate User.ts (diff)
downloadserver-e536fb2f72e4883979b451b60b12c44f5f94313c.tar.xz
replace all var with let (reduces warnings)
Diffstat (limited to 'bundle')
-rw-r--r--bundle/scripts/benchmark/connections.js4
-rw-r--r--bundle/src/start.ts2
-rw-r--r--bundle/src/stats.ts2
3 files changed, 4 insertions, 4 deletions
diff --git a/bundle/scripts/benchmark/connections.js b/bundle/scripts/benchmark/connections.js

index ffca2628..7e1abc10 100644 --- a/bundle/scripts/benchmark/connections.js +++ b/bundle/scripts/benchmark/connections.js
@@ -4,7 +4,7 @@ const WebSocket = require("ws"); const endpoint = process.env.GATEWAY || "ws://localhost:3001"; const connections = Number(process.env.CONNECTIONS) || 50; const token = process.env.TOKEN; -var cores = 1; +let cores = 1; try { cores = Number(process.env.THREADS) || os.cpus().length; } catch { @@ -12,7 +12,7 @@ try { } if (!token) { - console.error("TOKEN env var missing"); + console.error("TOKEN env let missing"); process.exit(); } diff --git a/bundle/src/start.ts b/bundle/src/start.ts
index de3b5848..a20581c3 100644 --- a/bundle/src/start.ts +++ b/bundle/src/start.ts
@@ -9,7 +9,7 @@ config(); import { execSync } from "child_process"; // TODO: add socket event transmission -var cores = 1; +let cores = 1; try { cores = Number(process.env.THREADS) || os.cpus().length; } catch { diff --git a/bundle/src/stats.ts b/bundle/src/stats.ts
index 0234e0b4..022b2000 100644 --- a/bundle/src/stats.ts +++ b/bundle/src/stats.ts
@@ -29,7 +29,7 @@ export function initStats() { // osu.mem.info(), // osu.netstat.inOut(), // ]); - // var networkUsage = ""; + // let networkUsage = ""; // if (typeof network === "object") { // networkUsage = `| [Network]: in ${network.total.inputMb}mb | out ${network.total.outputMb}mb`; // }