From 0908844e6deda2c4178138b0824e4a103eaeb5bf Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Sun, 16 Aug 2015 03:45:00 -0700 Subject: [PATCH] run only user/identity migration --- seed/loopbackMigration.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/seed/loopbackMigration.js b/seed/loopbackMigration.js index a06eea83c1..657ae01d53 100644 --- a/seed/loopbackMigration.js +++ b/seed/loopbackMigration.js @@ -6,7 +6,7 @@ var Rx = require('rx'), mongodb = require('mongodb'), secrets = require('../config/secrets'); -const batchSize = 100; +const batchSize = 20; var MongoClient = mongodb.MongoClient; Rx.config.longStackSupport = true; @@ -185,6 +185,7 @@ var userIdentityCount = users // count how many times insert completes .count(); +/* var storyCount = dbObservable .flatMap(function(db) { return createQuery(db, 'stories', {}, batchSize); @@ -200,16 +201,17 @@ var storyCount = dbObservable return insertMany(dats.db, 'story', dats.stories, { w: 1 }); }) .count(); + */ Rx.Observable.combineLatest( userIdentityCount, userSavesCount, - storyCount, - function(userIdentCount, userCount, storyCount) { + // storyCount, + function(userIdentCount, userCount) { return { userIdentCount: userIdentCount * batchSize, - userCount: userCount * batchSize, - storyCount: storyCount * batchSize + userCount: userCount * batchSize + // storyCount: storyCount * batchSize }; }) .subscribe(