|
|
@ -2,17 +2,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
var async = require('async'),
|
|
|
|
var async = require('async'),
|
|
|
|
winston = require('winston'),
|
|
|
|
winston = require('winston'),
|
|
|
|
fs = require('fs'),
|
|
|
|
|
|
|
|
path = require('path'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
groups = require('../groups'),
|
|
|
|
|
|
|
|
meta = require('../meta'),
|
|
|
|
meta = require('../meta'),
|
|
|
|
plugins = require('../plugins'),
|
|
|
|
plugins = require('../plugins'),
|
|
|
|
widgets = require('../widgets'),
|
|
|
|
widgets = require('../widgets'),
|
|
|
|
user = require('../user'),
|
|
|
|
user = require('../user'),
|
|
|
|
topics = require('../topics'),
|
|
|
|
|
|
|
|
posts = require('../posts'),
|
|
|
|
posts = require('../posts'),
|
|
|
|
categories = require('../categories'),
|
|
|
|
|
|
|
|
logger = require('../logger'),
|
|
|
|
logger = require('../logger'),
|
|
|
|
events = require('../events'),
|
|
|
|
events = require('../events'),
|
|
|
|
emailer = require('../emailer'),
|
|
|
|
emailer = require('../emailer'),
|
|
|
@ -277,7 +273,7 @@ function getHourlyStatsForSet(set, hour, numHours, callback) {
|
|
|
|
var termsArr = [];
|
|
|
|
var termsArr = [];
|
|
|
|
|
|
|
|
|
|
|
|
hoursArr.reverse();
|
|
|
|
hoursArr.reverse();
|
|
|
|
hoursArr.forEach(function(hour, idx) {
|
|
|
|
hoursArr.forEach(function(hour) {
|
|
|
|
termsArr.push(terms[hour]);
|
|
|
|
termsArr.push(terms[hour]);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -307,7 +303,7 @@ function getDailyStatsForSet(set, day, numDays, callback) {
|
|
|
|
}, function(err) {
|
|
|
|
}, function(err) {
|
|
|
|
callback(err, daysArr);
|
|
|
|
callback(err, daysArr);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SocketAdmin.getMoreEvents = function(socket, next, callback) {
|
|
|
|
SocketAdmin.getMoreEvents = function(socket, next, callback) {
|
|
|
|
var start = parseInt(next, 10);
|
|
|
|
var start = parseInt(next, 10);
|
|
|
@ -359,8 +355,4 @@ SocketAdmin.getMoreFlags = function(socket, data, callback) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
SocketAdmin.takeHeapSnapshot = function(socket, data, callback) {
|
|
|
|
|
|
|
|
require('heapdump').writeSnapshot(callback);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = SocketAdmin;
|
|
|
|
module.exports = SocketAdmin;
|
|
|
|