This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const prom = require('prom-client'); | |
const pm2 = require('pm2'); | |
let pm2Bus; | |
const REQ_TOPIC = 'get_prom_register'; | |
function pm2exec(cmd, ...args) { | |
return new Promise((resolve, reject) => { | |
pm2[cmd](...args, (err, resp) => (err ? reject(err) : resolve(resp))); |