mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
new flags --no-vizion and --no-autorestart
This commit is contained in:
parent
6df2fa175f
commit
d4eb669e6d
5
bin/pm2
5
bin/pm2
@ -44,13 +44,16 @@ commander.version(pkg.version)
|
||||
.option('--ignore-watch <folders|files>', 'folder/files to be ignored watching, chould be a specific name or regex - e.g. --ignore-watch="test node_modules \"some scripts\""')
|
||||
.option('--node-args <node_args>', 'space delimited arguments to pass to node in cluster mode - e.g. --node-args="--debug=7001 --trace-deprecation"')
|
||||
.option('--no-color', 'skip colors')
|
||||
.option('--no-vizion', 'start an app without vizion feature (versioning control)')
|
||||
.option('--no-autorestart', 'start an app without automatic restart')
|
||||
|
||||
.usage('[cmd] app');
|
||||
|
||||
commander.on('--help', function() {
|
||||
console.log(' Basic Examples:');
|
||||
console.log('');
|
||||
console.log(' Start an app using all CPUs available + set a name :');
|
||||
console.log(' $ pm2 start app.js -i max --name "api"');
|
||||
console.log(' $ pm2 start app.js -i 0 --name "api"');
|
||||
console.log('');
|
||||
console.log(' Restart the previous app launched, by name :');
|
||||
console.log(' $ pm2 restart api');
|
||||
|
||||
@ -309,10 +309,10 @@ God.handleExit = function handleExit(clu, exit_code) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!stopping)
|
||||
if (!stopping && proc.pm2_env.autorestart)
|
||||
proc.pm2_env.restart_time += 1;
|
||||
|
||||
if (!stopping && !overlimit)
|
||||
if (!stopping && !overlimit && proc.pm2_env.autorestart)
|
||||
this.executeApp(proc.pm2_env);
|
||||
|
||||
return false;
|
||||
|
||||
@ -62,6 +62,12 @@
|
||||
"merge_logs": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"vizion" : {
|
||||
"type": "boolean"
|
||||
},
|
||||
"autorestart" : {
|
||||
"type": "boolean"
|
||||
},
|
||||
"watch": {
|
||||
"type": [
|
||||
"boolean",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user