Nathan's updates to the userMigration script'

pull/320/head
Michael Q Larson 2015-04-14 21:19:05 -07:00
parent e033f224bc
commit ddb88643e0
3 changed files with 19 additions and 4 deletions

View File

@ -599,7 +599,7 @@
"Pair program as much as possible with different campers until you've completed all the Bonfire, Zipline and Basejump challenges. This is a big time investment, but the JavaScript practice you get will be well worth it!",
"Mark this challenge as complete and move on to the Bonfires.",
"Keep in mind, the Bonfires are a significant challenge in and of themselves. You are not expected to complete them in one sitting, or to complete them before moving on to our next challenges. Mix them in as you keep learning and have fun!",
"In order to participate in our non-profit projects you will need to have successfully completed all \"3 flame\" bonfires and below. Lasly, completing bonfires is not meant to be a sisyphean task. You won't be required to complete new bonfires that are of lower difficuly than you've already completed!"
"In order to participate in our non-profit projects you will need to have successfully completed all \"3 flame\" bonfires and below. Lastly, completing bonfires is not meant to be a sisyphean task. You won't be required to complete new bonfires that are of lower difficuly than you've already completed!"
],
"challengeType": 2,
"tests": []

View File

@ -9,7 +9,22 @@ var mongodb = require('mongodb'),
mongoose.connect(secrets.db);
var i = 1;
var stream = User.find({}).skip(0).limit(0).batchSize(1000).stream();
var stream = User.find({}).skip(0).limit(0).stream();
stream.on('data', function(user) {
console.log(i++);
user.save()
})
.on('error', function (err) {
console.log(err);
}).on('close', function () {
console.log('done with set');
stream.destroy();
});
i = 1;
var stream = User.find({'user.needsMigration': true}).skip(0).limit(0).stream();
stream.on('data', function (user) {
if (user.challengesHash) {

View File

@ -21,7 +21,7 @@ meta(name="twitter:creator", content="@freecodecamp")
meta(name="twitter:url", content="http://www.freecodecamp.com")
meta(name="twitter:site", content="@freecodecamp")
meta(name="twitter:card", content="summary_large_image")
meta(name="twitter:image:src", content="https://s3.amazonaws.com/freecodecamp/challenges.png")
meta(name="twitter:image:src", content="https://s3.amazonaws.com/freecodecamp/1000-hours-of-coding.jpg")
meta(name="twitter:title", content="Free Code Camp: a community of busy people learning to code")
meta(name="twitter:description", content="We're a community of busy people learning to code by collaborating on projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our online coding bootcamp.")
meta(content="a40ee5d5dba3bb091ad783ebd2b1383f", name="p:domain_verify")
@ -54,4 +54,4 @@ link(rel="mstile", sizes="310x310", href="https://s3.amazonaws.com/freecodecamp/
link(rel="mstile", sizes="310x150", href="https://s3.amazonaws.com/freecodecamp/favicons/mstile-310x150.png")
link(rel="mstile", sizes="70x70", href="https://s3.amazonaws.com/freecodecamp/favicons/mstile-70x70.png")
link(rel="favicon", href="https://s3.amazonaws.com/freecodecamp/favicons/favicon.ico")
link(rel='shortcut icon', href='//s3.amazonaws.com/freecodecamp/favicons/favicon.ico')
link(rel='shortcut icon', href='//s3.amazonaws.com/freecodecamp/favicons/favicon.ico')