Comparing version 2.10.1 to 2.10.2
@@ -0,1 +1,29 @@ | ||
## v2.10.2 ( Thu Mar 29 2018 13:06:11 GMT+0200 (CEST) ) | ||
## Bug Fixes | ||
- reinforce pm2-runtime auto exit strategy #3567 #3206 | ||
([e09cdbab](https://github.com/Unitech/pm2/commit/e09cdbabd0b479acda3cb24154bbaa071aa35407)) | ||
## Pull requests merged | ||
- Merge pull request #3569 from Unitech/pm2-runtime-hot-fix | ||
([473a2d6d](https://github.com/Unitech/pm2/commit/473a2d6d3867c617e4a41571d1780618c5025b87)) | ||
- Merge pull request #3547 from Unitech/revert-3532-logs-smart-app-name-cutting | ||
([438e3030](https://github.com/Unitech/pm2/commit/438e303013e82ecc199cb68d018144cde8a0b2e6)) | ||
- Merge pull request #3532 from N-Nagorny/logs-smart-app-name-cutting | ||
([067c18e6](https://github.com/Unitech/pm2/commit/067c18e601aca4fac10101a7c23cc4c3525ad776)) | ||
## v2.10.1 ( Mon Feb 26 2018 11:38:18 GMT+0100 (CET) ) | ||
## Bug Fixes | ||
- restore --raw option #3476 | ||
([340011ca](https://github.com/Unitech/pm2/commit/340011cace2b90c2a1ead8d86baba517f5570e15)) | ||
## v2.10.0 ( Mon Feb 19 2018 14:51:19 GMT+0100 (CET) ) | ||
@@ -2,0 +30,0 @@ |
@@ -13,2 +13,3 @@ 'use strict'; | ||
var path = require('path'); | ||
var DEFAULT_FAIL_COUNT = 3; | ||
@@ -125,4 +126,7 @@ process.env.PM2_DISCRETE_MODE = true; | ||
if (commander.autoExit) | ||
Runtime.autoExitWorker(); | ||
if (commander.autoExit) { | ||
setTimeout(function() { | ||
Runtime.autoExitWorker(); | ||
}, 4000); | ||
} | ||
@@ -143,7 +147,7 @@ // For Testing purpose (allow to auto exit CLI) | ||
*/ | ||
exit : function() { | ||
exit : function(code) { | ||
if (!this.pm2) return process.exit(1); | ||
this.pm2.kill(function() { | ||
process.exit(0); | ||
process.exit(code || 0); | ||
}); | ||
@@ -156,5 +160,8 @@ }, | ||
*/ | ||
autoExitWorker : function() { | ||
var interval = 1000; | ||
autoExitWorker : function(fail_count) { | ||
var interval = 2000; | ||
if (typeof(fail_count) =='undefined') | ||
fail_count = DEFAULT_FAIL_COUNT; | ||
var timer = setTimeout(function () { | ||
@@ -177,4 +184,6 @@ Runtime.pm2.list(function (err, apps) { | ||
if (appOnline === 0) { | ||
console.log('0 application online, exiting'); | ||
return Runtime.exit(); | ||
console.log('0 application online, retry =', fail_count); | ||
if (fail_count <= 0) | ||
return Runtime.exit(2); | ||
return Runtime.autoExitWorker(--fail_count); | ||
} | ||
@@ -181,0 +190,0 @@ |
{ | ||
"name": "pm2", | ||
"preferGlobal": true, | ||
"version": "2.10.1", | ||
"version": "2.10.2", | ||
"engines": { | ||
@@ -6,0 +6,0 @@ "node": ">=0.12" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
776467
109
17276