How to use the list function from pm2
Find comprehensive JavaScript pm2.list code examples handpicked from public code repositorys.
GitHub: ma-zal/pm2-watchdog
51 52 53 54 55 56 57 58 59 60 61
*/ function addWatchdogOfExistingProcesses() { console.trace('Getting list of processes.'); // Gets list of process managed by pm2 pm2.list( /** * * @param {Error|null} err * @param {ProcessDescription[]} apps
8
16
0
8 9 10 11 12 13 14 15 16 17 18
}); }; const listAsync = () => { return new Promise((resolve, reject) => { pm2.list((err, processDescriptionList) => { if (err) reject(err); resolve(processDescriptionList); }); });
0
0
1
pm2.restart is the most popular function in pm2 (219 examples)