Skip to content

Commit

Permalink
Revert "Fix use the physical CPU count from NodeJS (#7985)" (#8043)
Browse files Browse the repository at this point in the history
This reverts commit 1847278.
  • Loading branch information
JHyeok authored Mar 17, 2023
1 parent 59cf159 commit 75b5ebf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frameworks/JavaScript/nodejs/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const cluster = require('cluster');
const physicalCpuCount = require('physical-cpu-count')
const numCPUs = require('os').cpus().length;

process.env.NODE_HANDLER = 'mysql-raw';

Expand All @@ -17,7 +17,7 @@ if (cluster.isPrimary) {
console.log(`Primary ${process.pid} is running`);

// Fork workers.
for (let i = 0; i < physicalCpuCount; i++) {
for (let i = 0; i < numCPUs; i++) {
cluster.fork();
}

Expand Down
5 changes: 2 additions & 3 deletions frameworks/JavaScript/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
"mongoose": "5.7.5",
"mysql": "2.16.0",
"mysql2": "1.6.5",
"node-cache": "4.1.1",
"parseurl": "1.3.2",
"pg": "8.5.0",
"pg-hstore": "2.3.2",
"physical-cpu-count": "^2.0.0",
"sequelize": "5.15.1"
"sequelize": "5.15.1",
"node-cache": "4.1.1"
},
"main": "app.js"
}

0 comments on commit 75b5ebf

Please sign in to comment.