Added master/worker pm2 detection and mail configuration

This commit is contained in:
vjrj 2018-04-04 08:42:02 +02:00
parent f042beceb1
commit a6bd1095bf
5 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,16 @@
/* eslint-disable import/no-absolute-path */
import pm2Master from 'pm2-master';
import { Meteor } from 'meteor/meteor';
Meteor.startup(() => {
if (pm2Master.isMaster()) {
console.log('This is the master process');
} else {
console.log('This is a worker process');
}
});
const isMaster = () => pm2Master.isMaster();
export default isMaster;