Skip to content

Commit

Permalink
Fix log to use the new variable and fix stats (#1467)
Browse files Browse the repository at this point in the history
  • Loading branch information
lodoyun authored Oct 2, 2019
1 parent 1a4e0a4 commit 2edef3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions erizo_controller/ROV/rovMetricsGatherer.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ class RovMetricsGatherer {
getTotalPublishersAndSubscribers() {
this.log.debug('Getting total publishers and subscribers');
const requestPromises = [];
const command = 'var totalValues = {publishers: 0, subscribers: 0}; context.rooms.forEach((room)' +
'=> {const pubsubList = room.controller.getSubscribers(); const publishersInList = Object.keys(pubsubList); totalValues.publishers += publishersInList.length;' +
'publishersInList.forEach((pubId) => {totalValues.subscribers += pubsubList[pubId].length; });}); console.log(JSON.stringify(totalValues));';
const command = 'var totalValues = {publishers: 0, subscribers: 0};' +
'context.rooms.forEach((room) => {room.streamManager.forEachPublishedStream((pub) => {totalValues.publishers += 1;' +
'totalValues.subscribers += pub.avSubscribers.size; });}); console.log(JSON.stringify(totalValues));';
this.rovClient.components.erizoControllers.forEach((controller) => {
requestPromises.push(controller.runAndGetPromise(command));
});
Expand Down
2 changes: 1 addition & 1 deletion erizo_controller/erizoController/roomController.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exports.RoomController = (spec) => {
if (streamsInErizo.length > 0) {
log.error('message: ErizoJS timed out will be removed, ' +
`erizoId: ${erizoId}, ` +
`publishersAffected: ${erizo.publishers.length}`);
`publishersAffected: ${streamsInErizo.length}`);
streamsInErizo.forEach((publisher) => {
dispatchEvent('unpublish', publisher.id);
});
Expand Down

0 comments on commit 2edef3b

Please sign in to comment.