Skip to content

Commit 3ae581c

Browse files
JHyeokfranz1981
authored andcommitted
Revert "Fix use the physical CPU count from Fastify (TechEmpower#7988)" (TechEmpower#8044)
This reverts commit fe2ff26.
1 parent 23218a3 commit 3ae581c

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

frameworks/JavaScript/fastify/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const cluster = require("cluster");
2-
const physicalCpuCount = require("physical-cpu-count")
2+
const numCPUs = require("os").cpus().length;
33

44
if (cluster.isPrimary) {
55
console.log(`Primary ${process.pid} is running`);
66

77
// Fork workers.
8-
for (let i = 0; i < physicalCpuCount; i++) {
8+
for (let i = 0; i < numCPUs; i++) {
99
cluster.fork();
1010
}
1111

frameworks/JavaScript/fastify/fastify-mysql.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18.12.1-slim
1+
FROM node:18.12.1-alpine
22

33
COPY ./ ./
44

frameworks/JavaScript/fastify/fastify-postgres.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18.12.1-slim
1+
FROM node:18.12.1-alpine
22

33
COPY ./ ./
44

frameworks/JavaScript/fastify/fastify.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18.12.1-slim
1+
FROM node:18.12.1-alpine
22

33
COPY ./ ./
44

frameworks/JavaScript/fastify/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"knex": "2.4.2",
1212
"mongodb": "3.5.9",
1313
"mysql2": "2.2.5",
14-
"pg": "8.5.1",
15-
"physical-cpu-count": "^2.0.0"
14+
"pg": "8.5.1"
1615
}
1716
}

0 commit comments

Comments
 (0)