Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pm2.connect(true, function() {
pm2.restart('leapgim-server', function() {
console.log('leapgim-server restarted');
pm2.disconnect(function() { process.exit(0) });
});
});
});
return new Promise((resolve, reject) => {
pm2.restart(this.pm_id, (err) => {
if (err) {
console.error(`Process ${this.name} - restart failed. ${err.message || err}`);
reject(err);
return;
}
this.failsCountInRow = 0;
resolve();
});
});
pm2.connect(function (err) {
if (err) {
reject(err);
process.exit(2);
}
pm2.restart('gxb-box-pm2', function (err) {
if (err) {
reject(err);
} else {
pm2.describe('gxb-box-pm2', function (err, processDescription) {
if (err) {
reject(err);
} else {
resolve(processDescription);
}
});
}
});
});
});
pm2.connect(function (err) {
if (err) {
winston.error(err)
res.status(400).send(err)
return
}
pm2.restart('trudesk', function (err) {
if (err) {
res.status(400).send(err)
return winston.error(err)
}
pm2.disconnect()
res.send()
})
})
}
new Promise((resolve, reject) => {
restart(process, err => {
if (err && err.message !== 'process name not found') {
reject(err.message);
return;
}
resolve();
});
});
function restart() {
pm2.restart('hubot', () => pm2.disconnect());
}
new Promise((resolve, reject) => {
pm2.restart(packageId, (err, apps) => {
if (err) {
reject(err);
return;
}
resolve(apps);
});
});
pm2.connect(function (error) {
if (error) throw error;
pm2.restart('galleon-instance' || argv._[1], success("GALLEON RESTARTED SUCCESSFULLY!"));
});
},
pm2.connect(function(err) {
if (err)
winston.error(err);
pm2.restart('trudesk', function(err) {
if (err)
return winston.error(err);
pm2.disconnect();
});
});
}