Skip to content

Commit

Permalink
✔ 1 Fork
Browse files Browse the repository at this point in the history
  • Loading branch information
bifeldy committed Oct 11, 2023
1 parent 48831d6 commit 6e75aa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
if (cluster.isMaster) {
nestCtx.get(ClusterMasterSlaveService).masterMessages();
const gs = nestCtx.get(GlobalService);
const numCPUs = os.cpus().length;
const numCPUs = Math.min(os.cpus().length, Number.parseInt(process.env['CPUS']) || 1);
gs.log(`[APP_MASTER_PID] 💻`, process.pid);
for (let i = 0; i < numCPUs; i++) {
const worker = cluster.fork({ FSID: `${i}` });
Expand Down

0 comments on commit 6e75aa8

Please sign in to comment.