nne_client 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -0
- data/lib/nne_client/version.rb +1 -1
- data/lib/nne_client.rb +8 -0
- metadata +3 -3
data/README.md
CHANGED
data/lib/nne_client/version.rb
CHANGED
data/lib/nne_client.rb
CHANGED
@@ -40,6 +40,14 @@ module NNEClient
|
|
40
40
|
NNEClient::Search.new(query).result_set
|
41
41
|
end
|
42
42
|
|
43
|
+
def with_timeout(seconds, &block)
|
44
|
+
old_timeout = NNEClient.config.http_read_timeout
|
45
|
+
NNEClient.config.http_read_timeout = seconds
|
46
|
+
yield
|
47
|
+
ensure
|
48
|
+
NNEClient.config.http_read_timeout = old_timeout
|
49
|
+
end
|
50
|
+
|
43
51
|
def retry_timeouts(count, &block)
|
44
52
|
retries = 3
|
45
53
|
begin
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nne_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jacob Atzen
|