Skip to content

Commit

Permalink
Fix silent error
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Jun 4, 2012
1 parent f3ea59d commit c77c3e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/tagHourlyStat.js
Expand Up @@ -31,7 +31,7 @@ TagHourlyStat.statics.updateDailyQos = function(now, callback) {
var end = TimeCalculator.completeDay(now);
var TagDailyStat = require('./tagDailyStat');
QosAggregator.getQosForPeriod(this.collection, mapTag, start, end, function(err, results) {
if (err) return;
if (err) return callback(err);
async.forEach(results, function(result, cb) {
var stat = result.value;
TagDailyStat.update({ name: result._id, timestamp: start }, { $set: { count: stat.count, ups: stat.ups, responsives: stat.responsives, time: stat.time, downtime: stat.downtime } }, { upsert: true }, cb);
Expand All @@ -53,7 +53,7 @@ TagHourlyStat.statics.updateMonthlyQos = function(now, callback) {
var end = TimeCalculator.completeMonth(now);
var TagMonthlyStat = require('./tagMonthlyStat');
QosAggregator.getQosForPeriod(this.collection, mapTag, start, end, function(err, results) {
if (err) return;
if (err) return callback(err);
async.forEach(results, function(result, cb) {
var stat = result.value;
TagMonthlyStat.update({ name: result._id, timestamp: start }, { $set: { count: stat.count, ups: stat.ups, responsives: stat.responsives, time: stat.time, downtime: stat.downtime } }, { upsert: true }, cb);
Expand Down

0 comments on commit c77c3e3

Please sign in to comment.