routemaster-drain 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/routemaster/drain.rb +1 -1
- data/lib/routemaster/fetcher.rb +4 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9452c2ba0c6f31936f6876817ee7d67ec770b2f
|
4
|
+
data.tar.gz: 7eb4da8f25e7780b2cdef784a499d2c2407f6334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 457ae9942fff794fbffc636263e4e1619f867badc0ba474ee217ffb48376aa40c4cfe887898eefe5fa1e2be44f64fe451a0677972e6a91336f0eeb6dc7459d02
|
7
|
+
data.tar.gz: cf88b0164f7292afd1e46641c07f59f0489307d55b1b4f2dd4268e037b30c2c60ad4818156206853334fe25fb07261b5a243e54918030d6831584e2f6e7dbff1
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -67,8 +67,8 @@ Optional:
|
|
67
67
|
`server1:user:p4ss,server2:user:p4ass`.
|
68
68
|
- `ROUTEMASTER_QUEUE_NAME`: if using the cache, on which Resque queue the cache
|
69
69
|
population jobs should be enqueued.
|
70
|
-
|
71
|
-
|
70
|
+
- `ROUTEMASTER_CACHE_TIMEOUT`: if using the cache, how long before Faraday will timeout fetching the resource. Defaults to 1 second.
|
71
|
+
- `ROUTEMASTER_CACHE_VERIFY_SSL`: if using the cache, whether to verify SSL when fetching the resource. Defaults to false.
|
72
72
|
|
73
73
|
## Illustrated use cases
|
74
74
|
|
data/lib/routemaster/drain.rb
CHANGED
data/lib/routemaster/fetcher.rb
CHANGED
@@ -39,7 +39,7 @@ module Routemaster
|
|
39
39
|
end
|
40
40
|
|
41
41
|
private
|
42
|
-
|
42
|
+
|
43
43
|
def _connection
|
44
44
|
@_connection ||= Faraday.new do |f|
|
45
45
|
f.request :retry, max: 2, interval: 100e-3, backoff_factor: 2
|
@@ -48,10 +48,9 @@ module Routemaster
|
|
48
48
|
f.response :json, content_type: /\bjson/
|
49
49
|
f.adapter :net_http_persistent
|
50
50
|
|
51
|
-
|
52
|
-
f.options.
|
53
|
-
f.
|
54
|
-
f.ssl.verify = false
|
51
|
+
f.options.timeout = ENV.fetch('ROUTEMASTER_CACHE_TIMEOUT', 1).to_f
|
52
|
+
f.options.open_timeout = ENV.fetch('ROUTEMASTER_CACHE_TIMEOUT', 1).to_f
|
53
|
+
f.ssl.verify = ENV.fetch('ROUTEMASTER_CACHE_VERIFY_SSL', 'false') == 'true'
|
55
54
|
end
|
56
55
|
end
|
57
56
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: routemaster-drain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Letessier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|