fix options passing for scoped actions - remove useless code

This commit is contained in:
Unitech 2015-08-04 17:02:39 +02:00
parent 4872a97e21
commit e44aa064e2
2 changed files with 1 additions and 26 deletions

View File

@ -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) {

View File

@ -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;