File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ var argParser = require('yargs')
3232 . options ( 'verbose' , {
3333 default : true
3434 } )
35+ . options ( 'c' , {
36+ alias : 'concurrency' ,
37+ default : 50
38+ } )
3539 //.default('apiURL', 'http://en.wikipedia.org/w/api.php')
3640 //.default('prefix', 'en.wikipedia.org')
3741 //.default('ns', '0')
Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ process.on('SIGUSR2', function() {
2121var preq = require ( 'preq' ) ;
2222var PromiseStream = require ( './PromiseStream' ) ;
2323
24- // Article dump parallelism
25- var maxConcurrency = 50 ;
26-
2724function getArticles ( options , res ) {
2825 if ( ! res || res . next === 'finished' ) {
2926 // nothing more to do.
@@ -185,7 +182,7 @@ function dumpLoop (options) {
185182 { next : '' } , 6 ) ;
186183 var dumper = new Dumper ( articleChunkStream , options ) ;
187184 var dumpStream = new PromiseStream ( dumper . next . bind ( dumper ) ,
188- undefined , 1 , maxConcurrency ) ;
185+ undefined , 1 , options . concurrency ) ;
189186
190187 var i = 0 ;
191188 return new P ( function ( resolve , reject ) {
You can’t perform that action at this time.
0 commit comments