pm2
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -11,3 +11,2 @@ | ||
module.exports = { | ||
VERSION : '1.0.3', | ||
DEFAULT_FILE_PATH : DEFAULT_FILE_PATH, | ||
@@ -18,3 +17,3 @@ PM2_LOG_FILE_PATH : p.join(p.resolve(process.env.HOME, '.pm2'), 'pm2.log'), | ||
DUMP_FILE_PATH : p.join(DEFAULT_FILE_PATH, 'dump.pm2'), | ||
DAEMON_BIND_ADDR : 'localhost:66666', | ||
DAEMON_BIND_ADDR : 'localhost:6666', | ||
DEBUG : false, | ||
@@ -21,0 +20,0 @@ WEB_INTERFACE : 9615, |
@@ -187,2 +187,5 @@ // pm2-monitor // Code name : God | ||
if (opts.instances) { | ||
if (opts.instances == 'max') | ||
opts.instances = numCPUs; | ||
opts.instances = parseInt(opts.instances); | ||
// instances "max" have been setted | ||
@@ -189,0 +192,0 @@ // multi fork depending on number of cpus |
{ | ||
"name": "pm2", | ||
"preferGlobal": "true", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"engines" : { | ||
@@ -45,3 +45,3 @@ "node" : ">=0.8" | ||
"multimeter": "git://github.com/Alexandre-Strzelewicz/node-multimeter.git", | ||
"usage" : "0.3.4", | ||
"usage" : "0.3.5", | ||
"axon-rpc" : "0.0.2", | ||
@@ -48,0 +48,0 @@ "watch" : "0.7.0", |
@@ -22,2 +22,4 @@ ![Monit](https://github.com/unitech/pm2/raw/master/pres/pm2.png) | ||
$ pm2 start app.js -i 4 // Daemonize pm2 and Start 4 clustered instances of app.js | ||
// You can also pass the 'max' params to start | ||
// the right numbers of processes depending of CPUs | ||
@@ -31,4 +33,5 @@ $ pm2 list // Display all processes status | ||
$ pm2 resurect // Put online previously dumped processes | ||
$ pm2 restart // Restart all proccesses | ||
$ pm2 stop | ||
$ pm2 restart pm2_id // Restart specific process | ||
$ pm2 restartAll // Restart all proccesses | ||
$ pm2 stopAll | ||
$ pm2 generate app // Generate a JSON process configuration | ||
@@ -35,0 +38,0 @@ $ pm2 web // Health computer API endpoint (http://localhost:9615) |
@@ -33,7 +33,7 @@ | ||
}, function(err, proce) { | ||
proc = proce; | ||
proc.status.should.be.equal('online'); | ||
God.getFormatedProcesses().length.should.equal(1); | ||
done(); | ||
}); | ||
proc = proce; | ||
proc.status.should.be.equal('online'); | ||
God.getFormatedProcesses().length.should.equal(1); | ||
done(); | ||
}); | ||
}); | ||
@@ -72,9 +72,26 @@ | ||
}, function(err, procs) { | ||
God.getFormatedProcesses().length.should.equal(3); | ||
procs.length.should.equal(3); | ||
done(); | ||
}); | ||
God.getFormatedProcesses().length.should.equal(3); | ||
procs.length.should.equal(3); | ||
God.stopAll(done); | ||
}); | ||
}); | ||
it('should start maximum processes depending on CPU numbers', function(done) { | ||
God.prepare({ | ||
pm_exec_path : path.resolve(process.cwd(), 'test/fixtures/echo.js'), | ||
pm_err_log_path : path.resolve(process.cwd(), 'test/errLog.log'), | ||
pm_out_log_path : path.resolve(process.cwd(), 'test/outLog.log'), | ||
pm_pid_path : path.resolve(process.cwd(), 'test/child'), | ||
instances : 'max' | ||
}, function(err, procs) { | ||
God.getFormatedProcesses().length.should.equal(numCPUs); | ||
procs.length.should.equal(numCPUs); | ||
God.stopAll(done); | ||
}); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
443074
1111
163
+ Addedusage@0.3.5(transitive)
- Removedusage@0.3.4(transitive)
Updatedusage@0.3.5