|
@ -84,12 +84,12 @@ shepherd.post('/herdlist', function(req, res) { |
|
|
//console.log(req.body.herd);
|
|
|
//console.log(req.body.herd);
|
|
|
//console.log(req.body.options);
|
|
|
//console.log(req.body.options);
|
|
|
|
|
|
|
|
|
pm2.connect(true,function(err) { |
|
|
pm2.connect(true, function(err) { |
|
|
pm2.describe('IGUANA', function(err, list){ |
|
|
if (err) throw err; //todo: proper error handling
|
|
|
console.log(list[0]); |
|
|
pm2.describe("IGUANA", function(err, list) { |
|
|
for(var i = 0, l = list.length - 1; i < l; i++) { |
|
|
pm2.disconnect(); //disconnect after getting proc info list
|
|
|
console.log(list[i].pm2_env.status); |
|
|
if (err) throw err //todo: proper error handling
|
|
|
} |
|
|
console.log(list[0].pm2_env.status) //print status of IGUANA proc
|
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|