From e10eeb4544cd2484a2344656ef1a8ca70eb8ad0c Mon Sep 17 00:00:00 2001 From: "Johannes J. Schmidt" Date: Tue, 14 Jan 2014 15:12:06 +0100 Subject: [PATCH] fix config --- index.js | 22 +++++++++++++--------- package.json | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index 28252ce..ff8569e 100755 --- a/index.js +++ b/index.js @@ -28,7 +28,9 @@ couchmagick.get({ concurrency: pkg.name + '.concurrency', streams: pkg.name + '.streams', limit: pkg.name + '.limit', - timeout: pkg.name + '.timeout' + + changes_feed_timeout: pkg.name + '.changes_feed_timeout', + convert_process_timeout: pkg.name + '.convert_process_timeout' }, function(err, config) { if (err) { return process.exit(0); @@ -36,9 +38,10 @@ couchmagick.get({ // defaults config.concurrency = config.concurrency || 1; - config.streams = config.streams || 1; - config.timeout = config.timeout || 10000; - config.limit = config.limit || 100; + config.streams = config.streams || 1; + config.limit = config.limit || 100; + config.changes_feed_timeout = config.changes_feed_timeout || 10000; + config.convert_process_timeout = config.convert_process_timeout || 60000; couchmagick.info('using config ' + JSON.stringify(config).replace(/"password":".*?"/, '"password":"***"')); @@ -49,14 +52,15 @@ couchmagick.get({ var couch = url.format({ protocol: 'http', hostname: config.address, - port: config.port, - auth: config.auth && config.auth.username && config.auth.password ? [ config.auth.username, config.auth.password ].join(':') : null + port: config.port, + auth: config.auth && config.auth.username && config.auth.password ? [ config.auth.username, config.auth.password ].join(':') : null }); var options = { - limit: config.limit, - feed: 'continuous', - timeout: config.timeout, + limit: config.limit, + feed: 'continuous', + changes_feed_timeout: config.changes_feed_timeout, + convert_process_timeout: config.convert_process_timeout, concurrency: config.concurrency }; diff --git a/package.json b/package.json index fad2f12..c40f7ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "couchmagick", - "version": "1.6.3", + "version": "1.6.4", "description": "Run ImageMagicks `convert` on CouchDB documents.", "main": "index.js", "preferGlobal": true,