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 +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +3 -0
- data/lib/sqewer/connection.rb +9 -7
- data/lib/sqewer/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: 04eca66282554d24d485eb24c83cfbbe6c920eeafe2cc87f2f4638fb1c35ef82
|
4
|
+
data.tar.gz: 8eadd3fdbc63b6f0f26a65d5338a587fd6819889d94a83020914f4af65e527ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27504ff6d9db93063d766ced7efc1b76de5f4e7977490a2046316438eade94389705a75470e49d9d8e8a5a05862b2551df7d6d673398938b12c166842e6380bf
|
7
|
+
data.tar.gz: 1b1a9ef385a4ed693cc6d0999eb8d526b36fda101cfc6ab19e11d856ddf0327a4237affe854e7e03891c16cb9f8e7f4fe4c7140b26218eef64bd23909d4817c2
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/sqewer/connection.rb
CHANGED
@@ -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 *
|
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 *
|
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
|
data/lib/sqewer/version.rb
CHANGED
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.
|
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-
|
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
|