Permalink
Browse files

[minor] remove commented alternatives for now.

  • Loading branch information...
1 parent e1576ae commit 37321d9375db27d94270aba3c2bb60b58726f8dc @chjj chjj committed May 26, 2012
Showing with 0 additions and 29 deletions.
  1. +0 −29 lib/winston-mongodb.js
View
@@ -239,10 +239,6 @@ MongoDB.prototype.stream = function (options, stream) {
};
if (start != null) {
- // This may not work
- // with zero.
- // opt.skip = start;
-
this._db.collection(this.collection, function (err, col) {
if (err) return stream.emit('error', err);
col.find({}, { skip: start }).toArray(function (err, docs) {
@@ -264,22 +260,6 @@ MongoDB.prototype.stream = function (options, stream) {
if (stream.destroyed) return;
- // col.isCapped(function (err, isCapped) {
- // if (err) return stream.emit('error', err);
- // if (!isCapped) {
- // return self.streamPoll(options, stream);
- // }
- // next();
- // });
-
- // TODO: implement start
- // if (start == null) {
- // col.count({}, function (err, count) {
- // opt.skip = count;
- // next();
- // });
- // }
-
var cursor = col.find({}, opt);
// tail cursor
@@ -340,15 +320,6 @@ MongoDB.prototype.streamPoll = function (options, stream) {
if (start == null) {
last = new Date(new Date - 1000);
- // Alternate less hacky method:
- // this._db.collection(this.collection, function (err, col) {
- // col.count(function (err, len) {
- // // add each time as well
- // options.start = len;
- // self.streamPoll(options, stream); // use skip option first
- // });
- // });
- // return stream;
}
stream.destroy = function() {

0 comments on commit 37321d9

Please sign in to comment.