another fix

This commit is contained in:
Cassie Tarakajian 2017-12-27 12:19:53 -05:00
parent 665b1440d3
commit d4f78e0800

View file

@ -35,7 +35,7 @@ Project.count({})
return index < numProjects; return index < numProjects;
}, },
(whilstCb) => { (whilstCb) => {
let projects = await Project.find({}).skip(index).limit(CHUNK).exec(); Project.find({}).skip(index).limit(CHUNK).exec((err, projects) => {
async.eachSeries(projects, (project, cb) => { async.eachSeries(projects, (project, cb) => {
console.log(project.name); console.log(project.name);
async.eachSeries(project.files, (file, fileCb) => { async.eachSeries(project.files, (file, fileCb) => {
@ -56,6 +56,7 @@ Project.count({})
whilstCb(); whilstCb();
}); });
}); });
});
}, },
() => { () => {
console.log('finished processing all documents.') console.log('finished processing all documents.')