Added master/worker pm2 detection and mail configuration
This commit is contained in:
parent
f042beceb1
commit
a6bd1095bf
5 changed files with 27 additions and 1 deletions
16
imports/startup/server/isMaster.js
Normal file
16
imports/startup/server/isMaster.js
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue