Paralell Changes Feed processing

Closes #5
pull/20/head
Johannes J. Schmidt 11 years ago
parent ef795233fc
commit 3dbd6ebbfd

@ -26,6 +26,8 @@ Now CouchDB takes care of the couchmagick process.
; Optional username and password
username = mein-user
password = secure
; Number of simultanous processes. Default is 4
processes = 8
; Timeout in ms. Default is 10000
timeout = 1000
; Batch size. Default is 100

@ -28,6 +28,7 @@ couchmagick.get({
},
// Batching
processes: pkg.name + '.processes',
limit: pkg.name + '.limit',
timeout: pkg.name + '.timeout'
}, function(err, config) {
@ -36,6 +37,7 @@ couchmagick.get({
}
// defaults
config.processes = config.processes || 4;
config.timeout = config.timeout || 10000;
config.limit = config.limit || 100;
@ -81,7 +83,7 @@ couchmagick.get({
return process.exit(0);
}
async.eachSeries(dbs, listen, run);
async.eachLimit(dbs, config.processes, listen, run);
});
}
run();

@ -1,6 +1,6 @@
{
"name": "couchmagick",
"version": "1.1.7",
"version": "1.1.8",
"description": "Run ImageMagicks `convert` on CouchDB documents.",
"main": "index.js",
"preferGlobal": true,

Loading…
Cancel
Save