Skip to content

Commit

Permalink
fix: Unitech#3791 mitigate pidusage errores
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Jul 13, 2018
1 parent 7fc9f20 commit c0a99b6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/God/ActionMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@ module.exports = function(God) {
if (err) {
console.error('Error caught while calling pidusage');
console.error(err);

return cb(null, processes.map(function(pro) {
pro['monit'] = {
memory : 0,
cpu : 0
};
return pro
}))
}

if (!statistics) {
console.error('Statistics is not defined!')

return cb(null, processes.map(function(pro) {
pro['monit'] = {
memory : 0,
cpu : 0
};
return pro
}))
}

processes = processes.map(function(pro) {
Expand Down

0 comments on commit c0a99b6

Please sign in to comment.