From 43c3f9fecb03edaa0a92752e092aa811abec0143 Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Mon, 16 Nov 2015 19:10:40 -0800 Subject: [PATCH] Set `max_concurrency` to `50` --- README.md | 2 +- lib/html/proofer.rb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 09928c52..b8569c68 100644 --- a/README.md +++ b/README.md @@ -211,7 +211,7 @@ This sets `HTML::Proofer`'s extensions to use _.htm_, gives Typhoeus a configura You can similarly pass in a `:hydra` option with a hash configuration for Hydra. -The default value is `typhoeus => { :followlocation => true }`. +The default value is `{ :typhoeus => { :followlocation => true }, :hydra => { :max_concurrency => 50 } }`. ### Configuring Parallel diff --git a/lib/html/proofer.rb b/lib/html/proofer.rb index 5dfe026a..64feeafe 100644 --- a/lib/html/proofer.rb +++ b/lib/html/proofer.rb @@ -31,6 +31,10 @@ class Proofer } } + HYDRA_DEFAULTS = { + :max_concurrency => 50 + } + def initialize(src, opts = {}) @src = src @@ -65,7 +69,7 @@ def initialize(src, opts = {}) @typhoeus_opts = TYPHOEUS_DEFAULTS.merge(opts[:typhoeus] || {}) opts.delete(:typhoeus) - @hydra_opts = opts[:hydra] || {} + @hydra_opts = HYDRA_DEFAULTS.merge(opts[:hydra] || {}) opts.delete(:hydra) # fall back to parallel defaults