remove comments from migration
parent
9b72e03c76
commit
688bfd6137
|
@ -161,33 +161,15 @@ var storyCount = dbObservable
|
|||
})
|
||||
.count();
|
||||
|
||||
var commentCount = dbObservable
|
||||
.flatMap(function(db) {
|
||||
return createQuery(db, 'comments', {});
|
||||
})
|
||||
.bufferWithCount(20)
|
||||
.withLatestFrom(dbObservable, function(comments, db) {
|
||||
return {
|
||||
comments: comments,
|
||||
db: db
|
||||
};
|
||||
})
|
||||
.flatMap(function(dats) {
|
||||
return insertMany(dats.db, 'comment', dats.comments, { w: 1 });
|
||||
})
|
||||
.count();
|
||||
|
||||
Rx.Observable.combineLatest(
|
||||
userIdentityCount,
|
||||
userSavesCount,
|
||||
storyCount,
|
||||
commentCount,
|
||||
function(userIdentCount, userCount, storyCount, commentCount) {
|
||||
function(userIdentCount, userCount, storyCount) {
|
||||
return {
|
||||
userIdentCount: userIdentCount * 20,
|
||||
userCount: userCount * 20,
|
||||
storyCount: storyCount * 20,
|
||||
commentCount: commentCount * 20
|
||||
storyCount: storyCount * 20
|
||||
};
|
||||
})
|
||||
.subscribe(
|
||||
|
|
Loading…
Reference in New Issue