Skip to content

Commit

Permalink
Merge pull request Unitech#3874 from Unitech/trigger_no_action
Browse files Browse the repository at this point in the history
fix: Unitech#3786 fix issue when triggering an action that does not exist
  • Loading branch information
wallet77 authored Aug 21, 2018
2 parents 99b5a36 + 683cd87 commit 111d870
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/God/ActionMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,16 @@ module.exports = function(God) {

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

const isActionAvailable = proc_env.axm_actions.find(action => action.action_name === cmd.msg) !== undefined

// if action doesn't exist for this app
// try with the next one
if (isActionAvailable === 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 111d870

Please sign in to comment.