From e44aa064e2c8da347fc10bc73f5c1d5b48fab2ba Mon Sep 17 00:00:00 2001 From: Unitech Date: Tue, 4 Aug 2015 17:02:39 +0200 Subject: [PATCH] fix options passing for scoped actions - remove useless code --- lib/Interactor/RemoteActions/CustomActions.js | 2 +- lib/Satan.js | 25 ------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/lib/Interactor/RemoteActions/CustomActions.js b/lib/Interactor/RemoteActions/CustomActions.js index a261cf0a..f72aac59 100644 --- a/lib/Interactor/RemoteActions/CustomActions.js +++ b/lib/Interactor/RemoteActions/CustomActions.js @@ -68,7 +68,7 @@ var CustomActions = module.exports = { id : msg.process.pm_id, action_name : msg.action_name, msg : msg.action_name, - opts : msg.opts || {}, + opts : msg.options || {}, uuid : msg.uuid }, function(err, data) { if (err) { diff --git a/lib/Satan.js b/lib/Satan.js index 12c44704..12f30fc8 100644 --- a/lib/Satan.js +++ b/lib/Satan.js @@ -243,30 +243,6 @@ Satan.remoteWrapper = function() { return God; }); - /** - * Store output of custom action - * axm_action[] - * - action_name : name of the custom function - * - opts : misc options (e.g. for comments) - * - arity : function signature length - * - output : output of the custom action - */ - God.bus.on('axm:action:stream', function axmActions(msg) { - var pm2_env = msg.process; - var axm_action = msg.data; - - if (!pm2_env || !God.clusters_db[pm2_env.pm_id]) - return console.error('Unknown id %s', pm2_env.pm_id); - - God.clusters_db[pm2_env.pm_id].pm2_env.axm_actions.forEach(function(actions) { - if (actions.action_name == axm_action.action_name) { - if (!actions.output) - actions.output = []; - actions.output.push(axm_action.return); - } - }); - }); - /** * Configure module */ @@ -311,7 +287,6 @@ Satan.remoteWrapper = function() { if (['axm:action', 'axm:monitor', 'axm:option:setPID', - 'axm:action:stream', 'axm:option:configuration'].indexOf(this.event) > -1) { data_v = null; return false;