Merge pull request #10907 from jfsiebel/add-custom-heartbeat-flag

Add flag to enable/disabled custom heartbeat
This commit is contained in:
Anton Georgiev 2020-11-26 10:08:55 -05:00 committed by GitHub
commit 38ba6bc7db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 50 deletions

View File

@ -23,6 +23,10 @@ Meteor.startup(() => {
const CDN_URL = APP_CONFIG.cdn; const CDN_URL = APP_CONFIG.cdn;
let heapDumpMbThreshold = 100; let heapDumpMbThreshold = 100;
const { customHeartbeat } = APP_CONFIG;
if (customHeartbeat) {
Logger.warn('Custom heartbeat functions are enabled');
// https://github.com/sockjs/sockjs-node/blob/1ef08901f045aae7b4df0f91ef598d7a11e82897/lib/transport/websocket.js#L74-L82 // https://github.com/sockjs/sockjs-node/blob/1ef08901f045aae7b4df0f91ef598d7a11e82897/lib/transport/websocket.js#L74-L82
const newHeartbeat = function heartbeat() { const newHeartbeat = function heartbeat() {
const currentTime = new Date().getTime(); const currentTime = new Date().getTime();
@ -77,6 +81,7 @@ Meteor.startup(() => {
session.bbbFixApplied = true; session.bbbFixApplied = true;
} }
}, 5000); }, 5000);
}
const memoryMonitoringSettings = Meteor.settings.private.memoryMonitoring; const memoryMonitoringSettings = Meteor.settings.private.memoryMonitoring;
if (memoryMonitoringSettings.stat.enabled) { if (memoryMonitoringSettings.stat.enabled) {

View File

@ -36,6 +36,7 @@ public:
# can generate excessive overhead to the server. We recommend # can generate excessive overhead to the server. We recommend
# this value to be kept under 12. # this value to be kept under 12.
breakoutRoomLimit: 8 breakoutRoomLimit: 8
customHeartbeat: false
defaultSettings: defaultSettings:
application: application:
animations: true animations: true