judoscale-ruby 1.3.0 → 1.3.1
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/lib/judoscale/adapter_api.rb +9 -2
- data/lib/judoscale/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7afabec8caf1e0a7d257f258495dff1a37b08100bdc3774bc07f0c92d123d8ac
|
4
|
+
data.tar.gz: '039d32858527abd7b01b804491ed0296b19c77c91216cd7d5eec35b3ad90edf8'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '006019b006b438c3b45b44f72d4263ca5fab17db7958722670a7896d523b49f5651151557864ca41b19a94bce7fda7b91662639b63b885023fe95d95af358ed3'
|
7
|
+
data.tar.gz: f2e0ae3ffd1af3b4afd841b73e3dc17128ee7937a3b5e56a6a20264c1b63b62bf5ea31593458f8595a083990f313402c524c8017b49695ffa3a21bfd4bc70bad
|
data/Gemfile.lock
CHANGED
@@ -10,6 +10,13 @@ module Judoscale
|
|
10
10
|
include Logger
|
11
11
|
|
12
12
|
SUCCESS = "success"
|
13
|
+
TRANSIENT_ERRORS = [
|
14
|
+
Errno::ECONNREFUSED,
|
15
|
+
Errno::ECONNRESET,
|
16
|
+
Net::OpenTimeout,
|
17
|
+
Net::ReadTimeout,
|
18
|
+
OpenSSL::SSL::SSLError
|
19
|
+
]
|
13
20
|
|
14
21
|
def initialize(config)
|
15
22
|
@config = config
|
@@ -43,14 +50,14 @@ module Judoscale
|
|
43
50
|
when 200...300 then SuccessResponse.new(response.body)
|
44
51
|
else FailureResponse.new([response.code, response.message].join(" - "))
|
45
52
|
end
|
46
|
-
rescue
|
53
|
+
rescue *TRANSIENT_ERRORS => ex
|
47
54
|
if attempts < 3
|
48
55
|
# TCP timeouts happen sometimes, but they can usually be successfully retried in a moment
|
49
56
|
sleep 0.01
|
50
57
|
attempts += 1
|
51
58
|
retry
|
52
59
|
else
|
53
|
-
FailureResponse.new("
|
60
|
+
FailureResponse.new("Could not connect to #{uri.host}: #{ex.inspect}")
|
54
61
|
end
|
55
62
|
end
|
56
63
|
|
data/lib/judoscale/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: judoscale-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam McCrea
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|