sqewer 8.0.1 → 8.0.2

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: db608a0341020c8df0186ebc598164f5efef1c75051b4661aabb6e8c7e5c4406
4
- data.tar.gz: 3823ade5a67c8e66844eed3e267f5d5c4f0b6f3626c53c645d22ebb57b25ed12
3
+ metadata.gz: c3bde02330a40856f767370e8098ec7e11216c1434977b8072cdd78af410d132
4
+ data.tar.gz: 79a8fae95732af97fee2faa101abe058015e542fafe00c6f193298a8d2a9db29
5
5
  SHA512:
6
- metadata.gz: 2c549285412294f21ec5a8af1d5614e949941996c687b91478c5a1ed4553995e888aa56443dde5c6eace899b24d44d5a02e21dfb61d391408e126c01b001e3dd
7
- data.tar.gz: 49b1d928b6786d38911db7803498a42fd4860c8c7723ec09a477b464103eded17a752d3f900c01f20af5cd0d6d79360d260d78a7636a0a8c1f7e6e322554e209
6
+ metadata.gz: d0ee92f90995e1ad4fc439da92550fb6e9a9a294941b444a41b761e5589d82fb4cc4e5d7252359bc5b22f5675d6dcfb7f4dfb1fcf81e7376e3939f6a7e6cccd2
7
+ data.tar.gz: f95b7659f1fa00b51a0f4882515b5f0c6d655148849de83b9da4bf104814ccfe0a192cf617c1a56a2c154c8f79331ee5e6acb6979f7d795fc68ee4fc3401f831
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 8.0.2
2
+ - Add `Aws::SQS::Errors::AccessDenied` to the list of errors that Sqewer must release the singleton SQS client
3
+
1
4
  ### 8.0.1
2
5
  - Release the singleton SQS client when AWS raises credentials error to be able to use a new credential next time
3
6
 
@@ -13,6 +13,11 @@ class Sqewer::Connection
13
13
 
14
14
  NotOurFaultAwsError = Class.new(Sqewer::Error)
15
15
 
16
+ SQS_ERRORS_TO_RELEASE_CLIENT = [
17
+ Aws::Errors::MissingCredentialsError,
18
+ Aws::SQS::Errors::AccessDenied,
19
+ ]
20
+
16
21
  # A wrapper for most important properties of the received message
17
22
  class Message < Struct.new(:receipt_handle, :body, :attributes)
18
23
  def inspect
@@ -76,7 +81,7 @@ class Sqewer::Connection
76
81
  )
77
82
  response.messages.map {|message| Message.new(message.receipt_handle, message.body, message.attributes) }
78
83
  end
79
- rescue Aws::Errors::MissingCredentialsError
84
+ rescue *SQS_ERRORS_TO_RELEASE_CLIENT
80
85
  # We noticed cases where errors related to AWS credentials started to happen suddenly.
81
86
  # We don't know the root cause yet, but what we can do is release the
82
87
  # singleton @client instance because it contains a cache of credentials that in most
@@ -235,7 +240,7 @@ class Sqewer::Connection
235
240
  raise NotOurFaultAwsError
236
241
  end
237
242
  end
238
- rescue Aws::Errors::MissingCredentialsError
243
+ rescue *SQS_ERRORS_TO_RELEASE_CLIENT
239
244
  # We noticed cases where errors related to AWS credentials started to happen suddenly.
240
245
  # We don't know the root cause yet, but what we can do is release the
241
246
  # singleton @client instance because it contains a cache of credentials that in most
@@ -1,3 +1,3 @@
1
1
  module Sqewer
2
- VERSION = '8.0.1'
2
+ VERSION = '8.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.1
4
+ version: 8.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-12 00:00:00.000000000 Z
12
+ date: 2021-07-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk-sqs