diff --git a/api/package-lock.json b/api/package-lock.json index c78d3248..58e31f70 100644 Binary files a/api/package-lock.json and b/api/package-lock.json differ diff --git a/bundle/package-lock.json b/bundle/package-lock.json index 4201b230..2e333605 100644 Binary files a/bundle/package-lock.json and b/bundle/package-lock.json differ diff --git a/bundle/package.json b/bundle/package.json index e47d8536..c75f5da7 100644 --- a/bundle/package.json +++ b/bundle/package.json @@ -65,6 +65,7 @@ "assert": "^1.5.0", "async-exit-hook": "^2.0.1", "bcrypt": "^5.0.1", + "better-sqlite3": "^7.4.3", "body-parser": "^1.19.0", "btoa": "^1.2.1", "cheerio": "^1.0.0-rc.10", @@ -73,7 +74,7 @@ "express": "^4.17.1", "express-async-errors": "^3.1.1", "file-type": "^16.5.0", - "form-data": "^3.0.0", + "form-data": "^4.0.0", "fs-extra": "^10.0.0", "i18next": "^19.9.2", "i18next-http-middleware": "^3.1.3", @@ -92,11 +93,10 @@ "patch-package": "^6.4.7", "pg": "^8.7.1", "reflect-metadata": "^0.1.13", - "sqlite3": "^5.0.2", "supertest": "^6.1.6", "typeorm": "^0.2.37", "typescript": "^4.1.2", "typescript-json-schema": "^0.50.1", "ws": "^7.4.2" } -} \ No newline at end of file +} diff --git a/bundle/src/stats.ts b/bundle/src/stats.ts index 7928de89..9bd9131e 100644 --- a/bundle/src/stats.ts +++ b/bundle/src/stats.ts @@ -15,22 +15,23 @@ export function initStats() { ); } - setInterval(async () => { - const [cpuUsed, memory, network] = await Promise.all([ - osu.cpu.usage(), - osu.mem.info(), - osu.netstat.inOut(), - ]); - var networkUsage = ""; - if (typeof network === "object") { - networkUsage = `| [Network]: in ${network.total.inputMb}mb | out ${network.total.outputMb}mb`; - } + // TODO: node-os-utils might have a memory leak, more investigation needed + // TODO: doesn't work if spawned with multiple threads + // setInterval(async () => { + // const [cpuUsed, memory, network] = await Promise.all([ + // osu.cpu.usage(), + // osu.mem.info(), + // osu.netstat.inOut(), + // ]); + // var networkUsage = ""; + // if (typeof network === "object") { + // networkUsage = `| [Network]: in ${network.total.inputMb}mb | out ${network.total.outputMb}mb`; + // } - console.log( - `[CPU] ${cpuUsed.toPrecision(3)}% | [Memory] ${Math.round( - process.memoryUsage().rss / 1024 / 1024 - )}mb/${memory.totalMemMb.toFixed(0)}mb ${networkUsage}` - ); - // TODO: node-os-utils might have a memory leak, more investigation needed - }, 1000 * 60 * 5); + // console.log( + // `[CPU] ${cpuUsed.toPrecision(3)}% | [Memory] ${Math.round( + // process.memoryUsage().rss / 1024 / 1024 + // )}mb/${memory.totalMemMb.toFixed(0)}mb ${networkUsage}` + // ); + // }, 1000 * 60 * 5); } diff --git a/cdn/package-lock.json b/cdn/package-lock.json index 694ba679..38ce9eaa 100644 Binary files a/cdn/package-lock.json and b/cdn/package-lock.json differ diff --git a/gateway/package-lock.json b/gateway/package-lock.json index 4dbfbc49..5d6c5eec 100644 Binary files a/gateway/package-lock.json and b/gateway/package-lock.json differ diff --git a/util/package-lock.json b/util/package-lock.json index 57882628..3f4ca445 100644 Binary files a/util/package-lock.json and b/util/package-lock.json differ diff --git a/util/package.json b/util/package.json index 5692913d..6f465584 100644 --- a/util/package.json +++ b/util/package.json @@ -39,6 +39,7 @@ }, "dependencies": { "amqplib": "^0.8.0", + "better-sqlite3": "^7.4.3", "jsonwebtoken": "^8.5.1", "lambert-server": "^1.2.12", "missing-native-js-functions": "^1.2.18", @@ -48,7 +49,6 @@ "patch-package": "^6.4.7", "pg": "^8.7.1", "reflect-metadata": "^0.1.13", - "sqlite3": "^5.0.2", "typeorm": "^0.2.38", "typescript": "^4.4.2", "typescript-json-schema": "^0.50.1"