rails-autoscale-core 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a26698eaf5edca75ec2e8fd7bf1b5035f9b697c1a94fd81a062a9dfec80c636
4
- data.tar.gz: 30476ecf0afa5774c3773c2b2abbd7c258ef1256fe3e0d086d44a6cca07b69ff
3
+ metadata.gz: 36c26aeba2eb5413f339a8c1c756632a4299b7c397a05cfbea325c01ee562c28
4
+ data.tar.gz: '039d32858527abd7b01b804491ed0296b19c77c91216cd7d5eec35b3ad90edf8'
5
5
  SHA512:
6
- metadata.gz: ae8ddf51539fee0296c875b579dc7a01014fe2001393ea63c2c81da56e1ff008b154d51b60e0d86a42767908d030000d2441019a74380c48386742cb2e4f0e18
7
- data.tar.gz: 5e75546db2c28f54781d03b9c791731408e45f21a5055cddfe03fac7625131f194a4873fb50bcc5bca194754e035b07b1e6c686bbd0b0d932e0419ca65ae511e
6
+ metadata.gz: dbefb2b2c8f48a7ffd4e6b4b2a51cf4b54c545fae1c5db55d9dff45b3e33338ee34507f2950d7ab7e1a60ba0606957f6b87ec1ccffeaae812a723a2fd9603d98
7
+ data.tar.gz: f2e0ae3ffd1af3b4afd841b73e3dc17128ee7937a3b5e56a6a20264c1b63b62bf5ea31593458f8595a083990f313402c524c8017b49695ffa3a21bfd4bc70bad
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- judoscale-ruby (1.3.0)
4
+ judoscale-ruby (1.3.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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 Net::OpenTimeout
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("Timeout while obtaining TCP connection to #{uri.host}")
60
+ FailureResponse.new("Could not connect to #{uri.host}: #{ex.inspect}")
54
61
  end
55
62
  end
56
63
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Judoscale
4
- VERSION = "1.3.0"
4
+ VERSION = "1.3.1"
5
5
  end
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.3.0
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-02-09 00:00:00.000000000 Z
12
+ date: 2023-03-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: