The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/statistics/server/startup/monitor.js

21 lines
613 B

import { Meteor } from 'meteor/meteor';
import { InstanceStatus } from 'meteor/konecty:multiple-instances-status';
import { SAUMonitorClass } from '../lib/SAUMonitor';
import { settings } from '../../../settings/server';
const SAUMonitor = new SAUMonitorClass();
Meteor.startup(() => {
let TroubleshootDisableSessionsMonitor;
settings.get('Troubleshoot_Disable_Sessions_Monitor', (key, value) => {
if (TroubleshootDisableSessionsMonitor === value) { return; }
TroubleshootDisableSessionsMonitor = value;
if (value) {
return SAUMonitor.stop();
}
SAUMonitor.start(InstanceStatus.id());
});
});