Muthithreaded webapp
This commit is contained in:
parent
8c8dd605fa
commit
53a79c52e7
33
webapp.js
33
webapp.js
|
@ -193,24 +193,23 @@ loadFromFile((result) => {
|
||||||
const http = require('http');
|
const http = require('http');
|
||||||
const numCPUs = require('os').cpus().length;
|
const numCPUs = require('os').cpus().length;
|
||||||
|
|
||||||
// if (cluster.isMaster) {
|
if (cluster.isMaster) {
|
||||||
// // Fork workers.
|
// Fork workers.
|
||||||
// setInterval(() => {
|
setInterval(() => {
|
||||||
// if (cluster.isMaster) {
|
if (cluster.isMaster) {
|
||||||
// killOldInvites()
|
killOldInvites()
|
||||||
// }
|
}
|
||||||
// }, 3600000)
|
}, 3600000)
|
||||||
// for (let i = 0; i < numCPUs; i++) {
|
for (let i = 0; i < numCPUs; i++) {
|
||||||
// cluster.fork();
|
cluster.fork();
|
||||||
// }
|
}
|
||||||
|
|
||||||
// cluster.on('exit', (thread, code, signal) => {
|
cluster.on('exit', (thread, code, signal) => {
|
||||||
// console.log(`thread ${thread.process.pid} died`, code, signal)
|
console.log(`thread ${thread.process.pid} died`, code, signal)
|
||||||
// });
|
});
|
||||||
// } else {
|
} else {
|
||||||
// rootserver.listen(PORT)
|
rootserver.listen(PORT)
|
||||||
// }
|
}
|
||||||
rootserver.listen(PORT)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('SyncLounge WebApp successfully started on port ' + PORT)
|
console.log('SyncLounge WebApp successfully started on port ' + PORT)
|
||||||
|
|
Loading…
Reference in New Issue