From 6670ac1db3446b68f00c4ac8d0a977e20caf937b Mon Sep 17 00:00:00 2001 From: terakilobyte Date: Fri, 12 Jun 2015 18:55:47 -0400 Subject: [PATCH] Comment out blacklist --- flattenUser.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flattenUser.js b/flattenUser.js index 3163349cf2..64525b143d 100644 --- a/flattenUser.js +++ b/flattenUser.js @@ -36,11 +36,14 @@ function createQuery(db, collection, options, batchSize) { // or schedule getting next batch on nextTick cursor.each(function (err, doc) { if (err) { + console.log(err); return observer.onError(err); } if (!doc) { + console.log('hit complete'); return observer.onCompleted(); } + console.log('calling onnext'); observer.onNext(doc); }); @@ -98,6 +101,7 @@ var userSavesCount = users }) .flatMap(function(dats) { // bulk insert into new collection for loopback + console.log(dats); return insertMany(dats.db, 'user', dats.users, { w: 1 }); }) // count how many times insert completes @@ -142,7 +146,7 @@ Rx.Observable.merge( count += _count * 20; }, function(err) { - console.log('an error occured', err); + console.log('an error occured', err, err.stack); }, function() { console.log('finished with %s documents processed', count);