Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:Webinate/modepress into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MKHenson committed Nov 28, 2016
2 parents 5d3896b + 6bfbf23 commit bbc881f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/dist-src/modepress-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modepress-api",
"version": "0.0.1",
"main": "../modepress-api.js",
"main": "../../modepress-api.js",
"dependencies": {}
}
1 change: 0 additions & 1 deletion src/dist-src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"morgan": "^1.5.1",
"body-parser": "^1.12.0",
"method-override": "^2.3.1",
"node-inspector": "^0.12.7",
"request": "^2.69.0",
"jade": "^1.10.0",
"yargs": "^3.12.0",
Expand Down
12 changes: 6 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ let numCPUs = os.cpus().length;
// Check for the threads argument
if ( args.numThreads ) {
if ( args.numThreads === 'max' ) {
console.log( `Setting the number of clusters to ${numCPUs}` );
console.log( `Setting the number of clusters to ${ numCPUs }` );
}
else if ( isNaN( parseInt( args.numThreads ) ) ) {
console.log( 'attribute numThreads must be a number' );
process.exit();
}
else if ( args.numThreads > numCPUs ) {
console.log( `You only have ${numCPUs} threads available - attribute numThreads will be set to ${numCPUs}` );
console.log( `You only have ${ numCPUs } threads available - attribute numThreads will be set to ${ numCPUs }` );
}
else if ( args.numThreads ) {
console.log( `Setting the number of clusters to ${args.numThreads}` );
console.log( `Setting the number of clusters to ${ args.numThreads }` );
numCPUs = args.numThreads;
}
}
Expand Down Expand Up @@ -46,12 +46,12 @@ else if ( cluster.isMaster ) {
const newPID = worker.process.pid;
const oldPID = deadWorker.process.pid;

console.log( `Cluster ${worker.process.pid} died` );
console.log( `Cluster ${ worker.process.pid } died` );
console.log( `Attempting to restart failed cluster` );

// Log the event
console.log( `worker ${oldPID} died` );
console.log( `worker ${newPID} born` );
console.log( `worker ${ oldPID } died` );
console.log( `worker ${ newPID } born` );
});
}
else {
Expand Down

0 comments on commit bbc881f

Please sign in to comment.