Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Oct 26, 2024
1 parent 378a496 commit 5216bc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
with:
os: 'ubuntu-latest, macos-latest'
version: '14, 16, 18, 20, 22, 23'
install: npm run install-wrk && npm install
install: npm run install-wrk && npm install && cat /proc/cpuinfo
2 changes: 2 additions & 0 deletions simple/dispatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ const egg3 = require('egg3');
const egg2 = require('egg2');
const egg1 = require('egg1');
const cluster = require('cluster');
const os = require('os');

let workers = Number(process.argv[2] || require('os').cpus().length);
if (workers > 4) {
workers = 4;
}

if (cluster.isMaster) {
console.log('os version: %s', os.version());
console.log('egg-cluster version: %s', require('egg-cluster/package.json').version);

egg1.startCluster({
Expand Down

0 comments on commit 5216bc1

Please sign in to comment.