another fix
This commit is contained in:
parent
665b1440d3
commit
d4f78e0800
1 changed files with 19 additions and 18 deletions
|
@ -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.')
|
||||||
|
|
Loading…
Reference in a new issue