Skip to content

Commit

Permalink
fixed disperser
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed May 16, 2014
1 parent 5c26539 commit cf308d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/analytics/aggregator.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ exports.register = function (dbs, endpoints, options) {
};

options.aggregations.forEach(function (aggregationObject) {
validateAndRunAggregation(aggregationObject, 20);
validateAndRunAggregation(aggregationObject, 1000); // aggregation refresh frequency
});
};

4 changes: 3 additions & 1 deletion lib/analytics/genericGetter.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ function customQuery(collectionObj, filter, sort, limit, batchSize, streamified,
if (streamified) {
stream = cursor.sort({$natural: -1}).stream();
stream.on('data', function (document) {
documentHandler({id: document._id, time: document.t, data: (document.d === undefined ? document.key : document.d)});
document.time = document.t;
document.data = (document.d === undefined ? document.key : document.d);
documentHandler(document);
});
}
else {
Expand Down

0 comments on commit cf308d7

Please sign in to comment.