Skip to content

Commit

Permalink
Fixing duplicate events
Browse files Browse the repository at this point in the history
  • Loading branch information
Mircea Danila Dumitrescu committed Aug 29, 2014
1 parent ddf01eb commit a9746ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/analytics/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ exports.putterInit = function (db, options) {
return;
}
eventsToSave = eventsToSave.concat(events);
events=[];
}
if ((eventsToSave.length > bufferSize) || (new Date().getTime() - bufferTimestamp > 100 && eventsToSave.length > 0)) {
insertedDocs = eventsToSave.splice(0, bufferSize);
Expand Down

0 comments on commit a9746ee

Please sign in to comment.