1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 12:42:44 +01:00

use better-sqlite3 as default db

This commit is contained in:
Flam3rboy 2021-10-18 22:55:54 +02:00
parent 2a85285e63
commit 01fb2dbf4d
8 changed files with 22921 additions and 398 deletions

10
api/package-lock.json generated
View File

@ -71,16 +71,17 @@
"license": "GPLV3",
"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.17",
"missing-native-js-functions": "^1.2.18",
"multer": "^1.4.3",
"nanocolors": "^0.2.12",
"node-fetch": "^2.6.1",
"patch-package": "^6.4.7",
"pg": "^8.7.1",
"reflect-metadata": "^0.1.13",
"sqlite3": "^4.2.0",
"sqlite3": "^5.0.2",
"typeorm": "^0.2.38",
"typescript": "^4.4.2",
"typescript-json-schema": "^0.50.1"
@ -16964,17 +16965,18 @@
"@types/node": "^14.17.9",
"@types/node-fetch": "^2.5.12",
"amqplib": "^0.8.0",
"better-sqlite3": "^7.4.3",
"jest": "^27.0.6",
"jsonwebtoken": "^8.5.1",
"lambert-server": "^1.2.12",
"missing-native-js-functions": "^1.2.17",
"missing-native-js-functions": "^1.2.18",
"multer": "^1.4.3",
"nanocolors": "^0.2.12",
"node-fetch": "^2.6.1",
"patch-package": "^6.4.7",
"pg": "^8.7.1",
"reflect-metadata": "^0.1.13",
"sqlite3": "^4.2.0",
"sqlite3": "^5.0.2",
"ts-node": "^10.2.1",
"typeorm": "^0.2.38",
"typescript": "^4.4.2",

797
bundle/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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"
}
}
}

View File

@ -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);
}

14376
cdn/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -42,16 +42,17 @@
"license": "GPLV3",
"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.17",
"missing-native-js-functions": "^1.2.18",
"multer": "^1.4.3",
"nanocolors": "^0.2.12",
"node-fetch": "^2.6.1",
"patch-package": "^6.4.7",
"pg": "^8.7.1",
"reflect-metadata": "^0.1.13",
"sqlite3": "^4.2.0",
"sqlite3": "^5.0.2",
"typeorm": "^0.2.38",
"typescript": "^4.4.2",
"typescript-json-schema": "^0.50.1"
@ -8915,17 +8916,18 @@
"@types/node": "^14.17.9",
"@types/node-fetch": "^2.5.12",
"amqplib": "^0.8.0",
"better-sqlite3": "^7.4.3",
"jest": "^27.0.6",
"jsonwebtoken": "^8.5.1",
"lambert-server": "^1.2.12",
"missing-native-js-functions": "^1.2.17",
"missing-native-js-functions": "^1.2.18",
"multer": "^1.4.3",
"nanocolors": "^0.2.12",
"node-fetch": "^2.6.1",
"patch-package": "^6.4.7",
"pg": "^8.7.1",
"reflect-metadata": "^0.1.13",
"sqlite3": "^4.2.0",
"sqlite3": "^5.0.2",
"ts-node": "^10.2.1",
"typeorm": "^0.2.38",
"typescript": "^4.4.2",

8083
util/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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"