Merge branch 'staging' of github.com:FreeCodeCamp/freecodecamp into staging
This commit is contained in:
@ -60,7 +60,7 @@
|
|||||||
"lodash": "^3.9.3",
|
"lodash": "^3.9.3",
|
||||||
"loopback": "https://github.com/FreeCodeCamp/loopback.git#fix/no-password",
|
"loopback": "https://github.com/FreeCodeCamp/loopback.git#fix/no-password",
|
||||||
"loopback-boot": "^2.8.0",
|
"loopback-boot": "^2.8.0",
|
||||||
"loopback-component-passport": "git://github.com/FreeCodeCamp/loopback-component-passport.git#feature/emailOptional",
|
"loopback-component-passport": "1.4.0",
|
||||||
"loopback-connector-mongodb": "^1.10.0",
|
"loopback-connector-mongodb": "^1.10.0",
|
||||||
"lusca": "~1.0.2",
|
"lusca": "~1.0.2",
|
||||||
"method-override": "~2.3.0",
|
"method-override": "~2.3.0",
|
||||||
|
@ -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',
|
||||||
@ -164,6 +165,7 @@ var commentCount = dbObservable
|
|||||||
.flatMap(function(db) {
|
.flatMap(function(db) {
|
||||||
return createQuery(db, 'comments', {});
|
return createQuery(db, 'comments', {});
|
||||||
})
|
})
|
||||||
|
.bufferWithCount(20)
|
||||||
.withLatestFrom(dbObservable, function(comments, db) {
|
.withLatestFrom(dbObservable, function(comments, db) {
|
||||||
return {
|
return {
|
||||||
comments: comments,
|
comments: comments,
|
||||||
@ -173,7 +175,6 @@ 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)
|
|
||||||
.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