Skip to content

Commit

Permalink
Merge pull request #3516 from Unitech/drop_unused_feature
Browse files Browse the repository at this point in the history
chore: fix issue with snapshot command + remove command forceGc
  • Loading branch information
wallet77 authored Mar 5, 2018
2 parents 674e446 + 97fd101 commit 9436f11
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
9 changes: 0 additions & 9 deletions bin/pm2
Original file line number Diff line number Diff line change
Expand Up @@ -891,15 +891,6 @@ commander.command('backward <name>')
pm2.backward(pm2_name);
});

//
// Force PM2 to trigger garbage collection
//
commander.command('gc')
.description('force PM2 to trigger garbage collection')
.action(function() {
pm2.forceGc();
});

//
// Perform a deep update of PM2
//
Expand Down
3 changes: 1 addition & 2 deletions lib/Daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Daemon.prototype.innerStart = function(cb) {
var profiler;

try {
profiler = require('v8-profiler');
profiler = require('v8-profiler-node8');
} catch(e) {
profiler = null;
}
Expand Down Expand Up @@ -231,7 +231,6 @@ Daemon.prototype.innerStart = function(cb) {
notifyByProcessId : God.notifyByProcessId,

notifyKillPM2 : God.notifyKillPM2,
forceGc : God.forceGc,
monitor : God.monitor,
unmonitor : God.unmonitor,

Expand Down
17 changes: 0 additions & 17 deletions lib/God/Methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,21 +247,4 @@ module.exports = function(God) {
pm2_env.unstable_restarts = 0;
};

/**
* Description
* @method forcegc
* @return
*/
God.forceGc = function(opts, cb) {
if (global.gc) {
global.gc();
debug('Garbage collection triggered successfully');
if (cb) cb(null, {success: true});
}
else {
debug('Garbage collection failed');
if (cb) cb(null, {success: false});
}
};

};
1 change: 0 additions & 1 deletion lib/Satan.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ Satan.remoteWrapper = function() {

killMe : God.killMe,
notifyKillPM2 : God.notifyKillPM2,
forceGc : God.forceGc,

findByFullPath : God.findByFullPath,

Expand Down

0 comments on commit 9436f11

Please sign in to comment.