From 1ab406c5f8ba12f20ed257045c4235400936d72c Mon Sep 17 00:00:00 2001 From: Jesse Yang Date: Tue, 4 Mar 2014 21:10:27 +0800 Subject: [PATCH] i guess we need more time --- models/user/progress.js | 6 +++--- static/js/chart/bar.js | 1 - tasks/compute/index.js | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/models/user/progress.js b/models/user/progress.js index 08a0cf1..c2080f5 100644 --- a/models/user/progress.js +++ b/models/user/progress.js @@ -96,8 +96,8 @@ User.prototype.remaining = function() { var sr = this.statsRemaining() - // 10 seconds for stats by default - if (ret && sr === null) sr = 10000 + // 15 seconds for stats by default + if (ret && sr === null) sr = 15000 if (ret === 0 && sr === null) return null @@ -112,7 +112,7 @@ User.prototype.statsRemaining = function() { if (user.isIng()) { // At least five seconds - return Math.round(Math.sqrt(total) * (100 - (user.stats_p || 0)) * 2.5) + 5000 + return Math.round(Math.sqrt(total) * (100 - (user.stats_p || 0)) * 10) + 5000 } return null diff --git a/static/js/chart/bar.js b/static/js/chart/bar.js index 146eca3..2a2c871 100644 --- a/static/js/chart/bar.js +++ b/static/js/chart/bar.js @@ -243,7 +243,6 @@ Bar.prototype.grouped = function transitionGrouped(dur) { var y = self.y, x = self.x, n = self.n; y.domain([0, self.yGroupMax]); - console.log(y) self.style = 'grouped'; diff --git a/tasks/compute/index.js b/tasks/compute/index.js index 9e9414c..3a2c52c 100644 --- a/tasks/compute/index.js +++ b/tasks/compute/index.js @@ -62,7 +62,7 @@ compute = User.ensured(task.compute_pool.pooled(_compute = function(computings, log('resetting %s\'s compute status', user.uid) user.update({ stats_fail: stats_fail + 1, - stats_status: err, + stats_status: err.message, }, function() { arg.error(err) })