diff --git a/CHANGELOG.md b/CHANGELOG.md index 90998126..868f52b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ +## 4.1.2 + +- fix: temporarily disable system metrics retrieval + ## 4.1.1 - fix: #4452 disable network collection metric diff --git a/lib/Daemon.js b/lib/Daemon.js index 0cd91528..b9e10935 100644 --- a/lib/Daemon.js +++ b/lib/Daemon.js @@ -336,7 +336,8 @@ Daemon.prototype.gracefullExit = function() { console.log('pm2 has been killed by signal, dumping process list before exit...'); - God.system_infos_proc.kill() + if (God.system_infos !== null) + God.system_infos_proc.kill() God.dumpProcessList(function() { diff --git a/lib/God.js b/lib/God.js index 66208ff0..ed0ab7b1 100644 --- a/lib/God.js +++ b/lib/God.js @@ -73,21 +73,23 @@ God.init = function() { God.Worker.start() }, 500) - try { - var sysinfo = require('./Sysinfo/SystemInfo.js') - God.system_infos_proc = new sysinfo() + God.system_infos_proc = null - setInterval(() => { - God.system_infos_proc.query((err, data) => { - God.system_infos = data - }) - }, 1000) + // try { + // var sysinfo = require('./Sysinfo/SystemInfo.js') + // God.system_infos_proc = new sysinfo() - God.system_infos_proc.fork() - } catch(e) { - console.log(e) - God.system_infos_proc = null - } + // setInterval(() => { + // God.system_infos_proc.query((err, data) => { + // God.system_infos = data + // }) + // }, 1000) + + // God.system_infos_proc.fork() + // } catch(e) { + // console.log(e) + // God.system_infos_proc = null + // } } God.writeExitSeparator = function(pm2_env, code, signal) { diff --git a/package.json b/package.json index b8b2c425..3672533f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pm2", "preferGlobal": true, - "version": "4.1.1", + "version": "4.1.2", "engines": { "embed": "12.4.0", "node": ">=8.0.0" diff --git a/test/e2e/cli/cli-actions-2.sh b/test/e2e/cli/cli-actions-2.sh index aad7d6da..d62829c4 100644 --- a/test/e2e/cli/cli-actions-2.sh +++ b/test/e2e/cli/cli-actions-2.sh @@ -146,5 +146,6 @@ should 'should app be online' 'online' 2 kill `cat ~/.pm2/pm2.pid` spec "should have killed pm2" +sleep 2 pgrep "python" ispec "should python script be killed"