alphagov/rummageable — pull request #9 by dcarley (2013-04-25 08:03:21+00:00)
Title: Set timeouts for RestClient queries to Rummager

Set read and open timeouts on all RestClient queries to 5s and 1s
respectively. Previously this was using the Net::HTTP defaults of 60s and
60s, which can cause consumers of Rummager to block for a long time.

The new read value is quite low. Rationale being that it is close to the 4s
timeout imposed by `GdsApi::Base`, which `GdsApi::Rummager` is soon to
inherit. It is higher than the 2s now set between Rummager and Elastisearch.

New private method wraps RestClient because it's not possible to pass
options to the helper methods.

--

/cc @bradleywright @alext, who I believe consume this.

Doesn't current expose the timeout settings to consumers. Does it need to?