Skip to content

Commit

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

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
2 changes: 1 addition & 1 deletion frameworks/JavaScript/fastify/fastify-mysql.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.12.1-slim
FROM node:18.12.1-alpine

COPY ./ ./

Expand Down
2 changes: 1 addition & 1 deletion frameworks/JavaScript/fastify/fastify-postgres.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.12.1-slim
FROM node:18.12.1-alpine

COPY ./ ./

Expand Down
2 changes: 1 addition & 1 deletion frameworks/JavaScript/fastify/fastify.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.12.1-slim
FROM node:18.12.1-alpine

COPY ./ ./

Expand Down
3 changes: 1 addition & 2 deletions frameworks/JavaScript/fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"knex": "2.4.2",
"mongodb": "3.5.9",
"mysql2": "2.2.5",
"pg": "8.5.1",
"physical-cpu-count": "^2.0.0"
"pg": "8.5.1"
}
}

0 comments on commit d9be4ee

Please sign in to comment.