remove garbage collection gc node

pull/21/head
adriano 2023-01-01 21:24:50 -03:00
parent e68c0be622
commit 522790901d
2 changed files with 7 additions and 7 deletions

View File

@ -6,7 +6,7 @@
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"watch": "tsc -w", "watch": "tsc -w",
"start": "nodemon --expose-gc dist/server.js", "start": "nodemon dist/server.js",
"dev:server": "ts-node-dev --respawn --transpile-only --ignore node_modules src/server.ts", "dev:server": "ts-node-dev --respawn --transpile-only --ignore node_modules src/server.ts",
"pretest": "NODE_ENV=test sequelize db:migrate && NODE_ENV=test sequelize db:seed:all", "pretest": "NODE_ENV=test sequelize db:migrate && NODE_ENV=test sequelize db:seed:all",
"test": "NODE_ENV=test jest", "test": "NODE_ENV=test jest",

View File

@ -9,12 +9,12 @@ const server = app.listen(process.env.PORT, () => {
}); });
if (global.gc) { // if (global.gc) {
console.log(">> Starting Garbage Collector..."); // console.log(">> Starting Garbage Collector...");
global.gc(); // global.gc();
} else { // } else {
console.warn('No GC hook! Start your program as `node --expose-gc file.js`.'); // console.warn('No GC hook! Start your program as `node --expose-gc file.js`.');
} // }
initIO(server); initIO(server);
StartAllWhatsAppsSessions(); StartAllWhatsAppsSessions();