fix should be bufferWithCount
This commit is contained in:
@ -7,6 +7,7 @@ var Rx = require('rx'),
|
|||||||
secrets = require('../config/secrets');
|
secrets = require('../config/secrets');
|
||||||
|
|
||||||
var MongoClient = mongodb.MongoClient;
|
var MongoClient = mongodb.MongoClient;
|
||||||
|
Rx.config.longStackSupport = true;
|
||||||
|
|
||||||
var providers = [
|
var providers = [
|
||||||
'facebook',
|
'facebook',
|
||||||
@ -173,7 +174,7 @@ var commentCount = dbObservable
|
|||||||
.flatMap(function(dats) {
|
.flatMap(function(dats) {
|
||||||
return insertMany(dats.db, 'comment', dats.comments, { w: 1 });
|
return insertMany(dats.db, 'comment', dats.comments, { w: 1 });
|
||||||
})
|
})
|
||||||
.buffer(20)
|
.bufferWithCount(20)
|
||||||
.count();
|
.count();
|
||||||
|
|
||||||
Rx.Observable.combineLatest(
|
Rx.Observable.combineLatest(
|
||||||
@ -198,7 +199,6 @@ Rx.Observable.combineLatest(
|
|||||||
console.error('an error occured', err, err.stack);
|
console.error('an error occured', err, err.stack);
|
||||||
},
|
},
|
||||||
function() {
|
function() {
|
||||||
|
|
||||||
console.log('finished with ', count);
|
console.log('finished with ', count);
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user