Habilitação do garbage_collection
parent
8059781c92
commit
aa36aedd43
|
@ -6,7 +6,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"watch": "tsc -w",
|
"watch": "tsc -w",
|
||||||
"start": "nodemon dist/server.js",
|
"start": "nodemon --expose-gc 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",
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue