sqewer 8.0.2 → 8.0.3

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: c3bde02330a40856f767370e8098ec7e11216c1434977b8072cdd78af410d132
4
- data.tar.gz: 79a8fae95732af97fee2faa101abe058015e542fafe00c6f193298a8d2a9db29
3
+ metadata.gz: 04eca66282554d24d485eb24c83cfbbe6c920eeafe2cc87f2f4638fb1c35ef82
4
+ data.tar.gz: 8eadd3fdbc63b6f0f26a65d5338a587fd6819889d94a83020914f4af65e527ff
5
5
  SHA512:
6
- metadata.gz: d0ee92f90995e1ad4fc439da92550fb6e9a9a294941b444a41b761e5589d82fb4cc4e5d7252359bc5b22f5675d6dcfb7f4dfb1fcf81e7376e3939f6a7e6cccd2
7
- data.tar.gz: f95b7659f1fa00b51a0f4882515b5f0c6d655148849de83b9da4bf104814ccfe0a192cf617c1a56a2c154c8f79331ee5e6acb6979f7d795fc68ee4fc3401f831
6
+ metadata.gz: 27504ff6d9db93063d766ced7efc1b76de5f4e7977490a2046316438eade94389705a75470e49d9d8e8a5a05862b2551df7d6d673398938b12c166842e6380bf
7
+ data.tar.gz: 1b1a9ef385a4ed693cc6d0999eb8d526b36fda101cfc6ab19e11d856ddf0327a4237affe854e7e03891c16cb9f8e7f4fe4c7140b26218eef64bd23909d4817c2
data/.gitignore CHANGED
@@ -54,3 +54,5 @@ Gemfile.lock
54
54
 
55
55
  # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
56
  # .rubocop-https?--*
57
+
58
+ workdb.sqlite3*
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 8.0.3
2
+ - Fix `Sqewer::Connection` to properly get the list of AWS errors
3
+
1
4
  ### 8.0.2
2
5
  - Add `Aws::SQS::Errors::AccessDenied` to the list of errors that Sqewer must release the singleton SQS client
3
6
 
@@ -13,11 +13,6 @@ 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
-
21
16
  # A wrapper for most important properties of the received message
22
17
  class Message < Struct.new(:receipt_handle, :body, :attributes)
23
18
  def inspect
@@ -81,7 +76,7 @@ class Sqewer::Connection
81
76
  )
82
77
  response.messages.map {|message| Message.new(message.receipt_handle, message.body, message.attributes) }
83
78
  end
84
- rescue *SQS_ERRORS_TO_RELEASE_CLIENT
79
+ rescue *sqs_errors_to_release_client
85
80
  # We noticed cases where errors related to AWS credentials started to happen suddenly.
86
81
  # We don't know the root cause yet, but what we can do is release the
87
82
  # singleton @client instance because it contains a cache of credentials that in most
@@ -240,7 +235,7 @@ class Sqewer::Connection
240
235
  raise NotOurFaultAwsError
241
236
  end
242
237
  end
243
- rescue *SQS_ERRORS_TO_RELEASE_CLIENT
238
+ rescue *sqs_errors_to_release_client
244
239
  # We noticed cases where errors related to AWS credentials started to happen suddenly.
245
240
  # We don't know the root cause yet, but what we can do is release the
246
241
  # singleton @client instance because it contains a cache of credentials that in most
@@ -249,4 +244,11 @@ class Sqewer::Connection
249
244
 
250
245
  raise
251
246
  end
247
+
248
+ def sqs_errors_to_release_client
249
+ [
250
+ Aws::Errors::MissingCredentialsError,
251
+ Aws::SQS::Errors::AccessDenied,
252
+ ]
253
+ end
252
254
  end
@@ -1,3 +1,3 @@
1
1
  module Sqewer
2
- VERSION = '8.0.2'
2
+ VERSION = '8.0.3'
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.2
4
+ version: 8.0.3
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-28 00:00:00.000000000 Z
12
+ date: 2021-07-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk-sqs