no need for pubsub in getNodeInfo

v1.18.x
barisusakli 9 years ago
parent 20ae29cce3
commit d4055ddaef

@ -62,9 +62,8 @@ function getNodeInfo(callback) {
};
async.parallel({
pubsub: function(next) {
pubsub.publish('sync:stats:start');
next();
stats: function(next) {
rooms.getLocalStats(next);
},
gitInfo: function(next) {
getGitInfo(next);
@ -74,7 +73,7 @@ function getNodeInfo(callback) {
return callback(err);
}
data.git = results.gitInfo;
data.stats = rooms.stats[data.os.hostname + ':' + data.process.port];
data.stats = results.stats;
callback(null, data);
});
}

@ -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;
Loading…
Cancel
Save