Skip to content
Snippets Groups Projects
Commit b5326736 authored by Joao Siebel's avatar Joao Siebel
Browse files

Move metric function

parent 0ec85762
No related branches found
No related tags found
No related merge requests found
......@@ -68,22 +68,6 @@ class MeetingMessageQueue {
Logger.debug(`Redis: ${eventName} completed ${isAsync ? 'async' : 'sync'}`);
}
called = true;
const queueLength = this.queue.length();
if (queueLength > 100) {
Logger.warn(`Redis: MeetingMessageQueue for meetingId=${meetingId} has queue size=${queueLength} `);
}
next();
};
const onError = (reason) => {
Logger.error(`${eventName}: ${reason.stack ? reason.stack : reason}`);
callNext();
};
try {
if (this.redisDebugEnabled) {
Logger.debug(`Redis: ${JSON.stringify(data.parsedMessage.core)} emitted`);
}
if (queueMetrics) {
const queueId = meetingId || NO_MEETING_ID;
......@@ -127,6 +111,23 @@ class MeetingMessageQueue {
}
}
const queueLength = this.queue.length();
if (queueLength > 100) {
Logger.warn(`Redis: MeetingMessageQueue for meetingId=${meetingId} has queue size=${queueLength} `);
}
next();
};
const onError = (reason) => {
Logger.error(`${eventName}: ${reason.stack ? reason.stack : reason}`);
callNext();
};
try {
if (this.redisDebugEnabled) {
Logger.debug(`Redis: ${JSON.stringify(data.parsedMessage.core)} emitted`);
}
if (isAsync) {
callNext();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment