network_resiliency 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4eb56ca7bf0ce8610999ebfa3d51ddb42c0d1781fdbb944f305e362c03bb0f9a
4
- data.tar.gz: 9e40b02dfd30f3d60d0983586fe09842fab43a1decc1c419bf6b3b4f640c5613
3
+ metadata.gz: 6bf447ec73846d8911df202dc4a2ba576879a2768cd2a2e817ae9119a0e40506
4
+ data.tar.gz: d38481d92461272cbcefd34ea81f2c82d38381e135a06daed527210cdce6a178
5
5
  SHA512:
6
- metadata.gz: f872730f5fd3e25bb405b24b5cc0c0e3a807c9c582ca70d8bbc3ee172cba6126433f2a3f7d116a9df059fe08a5f4215856a7e3318d50bc160ebecfd463387aa7
7
- data.tar.gz: 8db779e5dd4fee001e9298806510351d6d0d0748ba0760d37acc9e205b6a425ea22a1f0757d26512a63936020baf764ec266620eb9cd6cbe23745abbb4f8acba
6
+ metadata.gz: 73b6e3fa940f4f8b91e26cc039b2bdfb37f7879a2a4c60ac1cc29e0572e79fd427c4984dfd8a139695e1225a370e295330833d81e250c6b3f922f467fb5f0b00
7
+ data.tar.gz: 00a8fe95736393d1e9133ca4d2d0c9873d859a93c53ef487503ad00762eadcaba18bad6c99138910a9bbf4916cc7eae5a464d8324657321b68eaaca076a5a10f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### v0.5.1 (2023-11-17)
2
+ - support nil timeouts
3
+
1
4
  ### v0.5.0 (2023-11-16)
2
5
  - postgres timeout stats
3
6
  - mysql timeout stats
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- network_resiliency (0.5.0)
4
+ network_resiliency (0.5.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -55,7 +55,7 @@ module NetworkResiliency
55
55
  destination: address,
56
56
  error: error,
57
57
  duration: ts,
58
- timeout: self.open_timeout * 1_000,
58
+ timeout: self.open_timeout.to_f * 1_000,
59
59
  attempts: attempts,
60
60
  )
61
61
  end
@@ -36,7 +36,7 @@ module NetworkResiliency
36
36
  destination: host,
37
37
  error: e&.class,
38
38
  duration: ts,
39
- timeout: query_options[:connect_timeout] * 1_000,
39
+ timeout: query_options[:connect_timeout].to_f * 1_000,
40
40
  )
41
41
  end
42
42
  end
@@ -78,7 +78,7 @@ module NetworkResiliency
78
78
  destination: host,
79
79
  duration: ts,
80
80
  error: error,
81
- timeout: @options[:connect_timeout] * 1_000,
81
+ timeout: @options[:connect_timeout].to_f * 1_000,
82
82
  attempts: attempts,
83
83
  )
84
84
  end
@@ -1,3 +1,3 @@
1
1
  module NetworkResiliency
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -135,7 +135,7 @@ module NetworkResiliency
135
135
  adapter: adapter,
136
136
  destination: destination,
137
137
  },
138
- )
138
+ ) if timeout && timeout > 0
139
139
 
140
140
  if error
141
141
  NetworkResiliency.statsd&.distribution(
@@ -145,7 +145,7 @@ module NetworkResiliency
145
145
  adapter: adapter,
146
146
  destination: destination,
147
147
  },
148
- ) if timeout
148
+ ) if timeout && timeout > 0
149
149
  else
150
150
  # track successful retries
151
151
  NetworkResiliency.statsd&.increment(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: network_resiliency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Pepper