From d7bcf85c1b8dbd5a493d54d421c118ebc0a8078e Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sun, 9 Mar 2014 22:36:39 -0500 Subject: [PATCH] Hopefully fix some background task issues --- lib/bgtask.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/bgtask.js b/lib/bgtask.js index 509fbd0f..8cd1dc02 100644 --- a/lib/bgtask.js +++ b/lib/bgtask.js @@ -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];