Skip to content

Commit

Permalink
fix: #3786 fix issue when triggering an action that does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
wallet77 committed Aug 21, 2018
1 parent 55b6ccc commit 1ff7fd3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/God/ActionMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,22 @@ module.exports = function(God) {

var proc_env = God.clusters_db[id].pm2_env;

var action_exist = false;
proc_env.axm_actions.forEach(function(action) {
console.log(action, cmd)
if (action.action_name === cmd.msg) {
action_exist = true;
}
});

// if action doesn't exist for this app
// try with the next one
if (action_exist === false) {
arr.shift();
return ex(arr);
}


if ((p.basename(proc_env.pm_exec_path) == name ||
proc_env.name == name) &&
(proc_env.status == cst.ONLINE_STATUS ||
Expand Down

0 comments on commit 1ff7fd3

Please sign in to comment.