File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
frameworks/TypeScript/nest Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 28
28
"mongodb" : " 3.5.4" ,
29
29
"mysql2" : " 2.1.0" ,
30
30
"pg" : " 8.5.1" ,
31
- "physical-cpu-count" : " ^2.0.0" ,
32
31
"point-of-view" : " 3.7.2" ,
33
32
"reflect-metadata" : " 0.1.13" ,
34
33
"rimraf" : " 3.0.2" ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { MongoModule } from './mongo/mongo.module';
9
9
import { join } from 'path' ;
10
10
import { SqlModule } from './sql/sql.module' ;
11
11
import cluster from 'cluster'
12
- import physicalCpuCount from 'physical-cpu-count' ;
12
+ import os = require ( 'os' ) ;
13
13
14
14
const port = process . env . PORT || 8080 ;
15
15
@@ -58,7 +58,8 @@ async function bootstrapFastify() {
58
58
}
59
59
60
60
if ( cluster . isPrimary ) {
61
- for ( let i = 0 ; i < physicalCpuCount ; i ++ ) {
61
+ const cpus = os . cpus ( ) . length ;
62
+ for ( let i = 0 ; i < cpus ; i ++ ) {
62
63
cluster . fork ( ) ;
63
64
}
64
65
You can’t perform that action at this time.
0 commit comments