mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
fix options passing for scoped actions - remove useless code
This commit is contained in:
parent
4872a97e21
commit
e44aa064e2
@ -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) {
|
||||
|
||||
25
lib/Satan.js
25
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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user