Skip to content

Commit aeb5dd0

Browse files
committed
Process up to two dumps in parallel
1 parent 6b8dad7 commit aeb5dd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/dump_restbase.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ function dumpAllWikis (options) {
6262
}
6363
})
6464
.then(function(res) {
65-
return P.each(res.body.items, function(domain) {
65+
return P.map(res.body.items, function(domain) {
6666
console.log(domain);
6767
options.domain = domain;
6868
return dumpWiki(options)
6969
.catch(function(res) {
7070
console.log(domain, res);
7171
});
72-
});
72+
}, { concurrency: 2 });
7373
})
7474
.then(function() {
7575
console.log('All dumps done.');

0 commit comments

Comments
 (0)