How to use the disconnect function from pm2
Find comprehensive JavaScript pm2.disconnect code examples handpicked from public code repositorys.
GitHub: ma-zal/pm2-watchdog
61 62 63 64 65 66 67 68 69 70
*/ function(err, apps) { if (err) { console.error(`PM2 get process list failed. ${err.message || err}`); pm2.disconnect(); return; } apps.forEach((/*ProcessDescription*/ processDescription) => {
8
16
0
GitHub: daxoneczek/bocik2
4 5 6 7 8 9 10 11 12 13
console.error(err); process.exit(2); } pm2.stop('index.js', function(err) { pm2.disconnect(); // odłączamy się od pm2, gdy już nie jest nam potrzebne połączenie if (err) { console.error(err); process.exit(2); }
0
0
0
pm2.restart is the most popular function in pm2 (219 examples)