sqewer 8.0.0 → 8.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/sqewer/connection.rb +22 -0
- data/lib/sqewer/version.rb +1 -1
- data/sqewer.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db608a0341020c8df0186ebc598164f5efef1c75051b4661aabb6e8c7e5c4406
|
4
|
+
data.tar.gz: 3823ade5a67c8e66844eed3e267f5d5c4f0b6f3626c53c645d22ebb57b25ed12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c549285412294f21ec5a8af1d5614e949941996c687b91478c5a1ed4553995e888aa56443dde5c6eace899b24d44d5a02e21dfb61d391408e126c01b001e3dd
|
7
|
+
data.tar.gz: 49b1d928b6786d38911db7803498a42fd4860c8c7723ec09a477b464103eded17a752d3f900c01f20af5cd0d6d79360d260d78a7636a0a8c1f7e6e322554e209
|
data/CHANGELOG.md
CHANGED
data/lib/sqewer/connection.rb
CHANGED
@@ -76,6 +76,14 @@ class Sqewer::Connection
|
|
76
76
|
)
|
77
77
|
response.messages.map {|message| Message.new(message.receipt_handle, message.body, message.attributes) }
|
78
78
|
end
|
79
|
+
rescue Aws::Errors::MissingCredentialsError
|
80
|
+
# We noticed cases where errors related to AWS credentials started to happen suddenly.
|
81
|
+
# We don't know the root cause yet, but what we can do is release the
|
82
|
+
# singleton @client instance because it contains a cache of credentials that in most
|
83
|
+
# cases is no longer valid.
|
84
|
+
self.class.release_client
|
85
|
+
|
86
|
+
raise
|
79
87
|
end
|
80
88
|
|
81
89
|
# Send a message to the backing queue
|
@@ -202,6 +210,12 @@ class Sqewer::Connection
|
|
202
210
|
buffer.each_batch {|batch| handle_batch_with_retries(:delete_message_batch, batch) }
|
203
211
|
end
|
204
212
|
|
213
|
+
protected
|
214
|
+
|
215
|
+
def self.release_client
|
216
|
+
@client = nil
|
217
|
+
end
|
218
|
+
|
205
219
|
private
|
206
220
|
|
207
221
|
def network_and_aws_sdk_errors
|
@@ -221,5 +235,13 @@ class Sqewer::Connection
|
|
221
235
|
raise NotOurFaultAwsError
|
222
236
|
end
|
223
237
|
end
|
238
|
+
rescue Aws::Errors::MissingCredentialsError
|
239
|
+
# We noticed cases where errors related to AWS credentials started to happen suddenly.
|
240
|
+
# We don't know the root cause yet, but what we can do is release the
|
241
|
+
# singleton @client instance because it contains a cache of credentials that in most
|
242
|
+
# cases is no longer valid.
|
243
|
+
self.class.release_client
|
244
|
+
|
245
|
+
raise
|
224
246
|
end
|
225
247
|
end
|
data/lib/sqewer/version.rb
CHANGED
data/sqewer.gemspec
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.1
|
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-
|
12
|
+
date: 2021-07-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-sqs
|
@@ -221,6 +221,20 @@ dependencies:
|
|
221
221
|
- - "~>"
|
222
222
|
- !ruby/object:Gem::Version
|
223
223
|
version: '2'
|
224
|
+
- !ruby/object:Gem::Dependency
|
225
|
+
name: pry-byebug
|
226
|
+
requirement: !ruby/object:Gem::Requirement
|
227
|
+
requirements:
|
228
|
+
- - ">="
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: '0'
|
231
|
+
type: :development
|
232
|
+
prerelease: false
|
233
|
+
version_requirements: !ruby/object:Gem::Requirement
|
234
|
+
requirements:
|
235
|
+
- - ">="
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
version: '0'
|
224
238
|
description: A full-featured library for all them SQS worker needs
|
225
239
|
email:
|
226
240
|
- me@julik.nl
|