Hopefully fix some background task issues

This commit is contained in:
Calvin Montgomery 2014-03-09 22:36:39 -05:00
parent e841196570
commit d7bcf85c1b

View file

@ -25,8 +25,8 @@ var init = null;
/* Stats */
function initStats(Server) {
var STAT_INTERVAL = Config.get("stats.interval");
var STAT_EXPIRE = Config.get("stats.max-age");
var STAT_INTERVAL = parseInt(Config.get("stats.interval"));
var STAT_EXPIRE = parseInt(Config.get("stats.max-age"));
setInterval(function () {
var chancount = Server.channels.length;
@ -45,8 +45,8 @@ function initStats(Server) {
/* Alias cleanup */
function initAliasCleanup(Server) {
var CLEAN_INTERVAL = Config.get("aliases.purge-interval");
var CLEAN_EXPIRE = Config.get("aliases.max-age");
var CLEAN_INTERVAL = parseInt(Config.get("aliases.purge-interval"));
var CLEAN_EXPIRE = parseInt(Config.get("aliases.max-age"));
setInterval(function () {
db.cleanOldAliases(CLEAN_EXPIRE, function (err) {
@ -81,7 +81,8 @@ function initIpThrottleCleanup(Server) {
}
function initChannelDumper(Server) {
var CHANNEL_SAVE_INTERVAL = Config.get("channel-save-interval") * 60000;
var CHANNEL_SAVE_INTERVAL = parseInt(Config.get("channel-save-interval"))
* 60000;
setInterval(function () {
for (var i = 0; i < Server.channels.length; i++) {
var chan = Server.channels[i];