rails-autoscale-core 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/lib/rails_autoscale/adapter_api.rb +10 -0
- data/lib/rails_autoscale/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: 6e3965a75e10b708b979dca1905a0bdbf00ee4b19d04b5c4ff481e1bc8406313
|
|
4
|
+
data.tar.gz: 58853499d9554401a80bb6596e0c8cc4c0a6752e3330495581530bdfd4201a0e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39bce8c66b0745625a394372be5a52e4187a1233c0fafa3796690310928eb2a5a1136d4b9eb602b54f12c6426877de0c59dea4b1fbe982ba5dc9441ffefc1a4c
|
|
7
|
+
data.tar.gz: 6e7bf15c7e37afca59d4dd6f3bbd1e184ab00948eb5c0a9c4c56c08b7d7a85eb26ce101e68f0146313f97fcfb544c95fa05e99c35daa41689782d7f55649afd5
|
data/Gemfile.lock
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rails-autoscale-core (1.0.
|
|
4
|
+
rails-autoscale-core (1.0.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
|
-
addressable (2.8.
|
|
10
|
-
public_suffix (>= 2.0.2, <
|
|
9
|
+
addressable (2.8.1)
|
|
10
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
11
11
|
crack (0.4.5)
|
|
12
12
|
rexml
|
|
13
13
|
hashdiff (1.0.1)
|
|
14
14
|
minitest (5.15.0)
|
|
15
|
-
public_suffix (
|
|
15
|
+
public_suffix (5.0.0)
|
|
16
16
|
rake (13.0.6)
|
|
17
17
|
rexml (3.2.5)
|
|
18
|
-
webmock (3.
|
|
18
|
+
webmock (3.18.1)
|
|
19
19
|
addressable (>= 2.8.0)
|
|
20
20
|
crack (>= 0.3.2)
|
|
21
21
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
@@ -27,6 +27,7 @@ module RailsAutoscale
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def post_raw(options)
|
|
30
|
+
attempts ||= 1
|
|
30
31
|
uri = URI.parse("#{@config.api_base_url}#{options.fetch(:path)}")
|
|
31
32
|
ssl = uri.scheme == "https"
|
|
32
33
|
|
|
@@ -42,6 +43,15 @@ module RailsAutoscale
|
|
|
42
43
|
when 200...300 then SuccessResponse.new(response.body)
|
|
43
44
|
else FailureResponse.new([response.code, response.message].join(" - "))
|
|
44
45
|
end
|
|
46
|
+
rescue Net::OpenTimeout
|
|
47
|
+
if attempts < 3
|
|
48
|
+
# TCP timeouts happen sometimes, but they can usually be successfully retried in a moment
|
|
49
|
+
sleep 0.01
|
|
50
|
+
attempts += 1
|
|
51
|
+
retry
|
|
52
|
+
else
|
|
53
|
+
FailureResponse.new("Timeout while obtaining TCP connection to #{uri.host}")
|
|
54
|
+
end
|
|
45
55
|
end
|
|
46
56
|
|
|
47
57
|
class SuccessResponse < Struct.new(:body)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-autoscale-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.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: 2022-09-
|
|
12
|
+
date: 2022-09-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description:
|
|
15
15
|
email:
|