no need for pubsub in getNodeInfo

This commit is contained in:
barisusakli
2016-08-31 14:25:36 +03:00
parent 20ae29cce3
commit d4055ddaef
2 changed files with 7 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ var SocketRooms = {
pubsub.on('sync:stats:start', function() {
getLocalStats(function(err, stats) {
SocketRooms.getLocalStats(function(err, stats) {
if (err) {
return winston.error(err);
}
@@ -50,7 +50,7 @@ SocketRooms.getTotalGuestCount = function(callback) {
pubsub.removeAllListeners('sync:stats:guests:end');
callback(null, count);
}, 100);
}
};
SocketRooms.getAll = function(socket, data, callback) {
@@ -129,7 +129,7 @@ SocketRooms.getOnlineUserCount = function(io) {
return count;
};
function getLocalStats(callback) {
SocketRooms.getLocalStats = function(callback) {
var io = require('../index').server;
if (!io) {
@@ -172,7 +172,7 @@ function getLocalStats(callback) {
socketData.topics = topTenTopics;
callback(null, socketData);
}
};
module.exports = SocketRooms;