eventq_aws 1.6.3 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a438dcdde3a61596dba2778582d6a3f0ba85c992
4
- data.tar.gz: 33f1d1a724111e2a762ea971f64a88bdab7745be
3
+ metadata.gz: 03fe17fdd0af8f2a61823abb1d83b534059e3287
4
+ data.tar.gz: 5cd347facb1f62b5e75055fe6e8f2d5588372327
5
5
  SHA512:
6
- metadata.gz: 36ca675e36a0a918554ca2e77206cffc751a9f4ef5a6fdd9254d4f6630e7a751bcf0e79a5b4d4cb13df88ae598114ceb7b82252baea5bcc90ffb7a7ca05ddd54
7
- data.tar.gz: bc5235567f0fce538de4b6fe8f0b6e4ef9f68b84f7d35fd8fd5e7c3982075a81f6f9bd7d902d212ee1cfb56acd5af255138eff322a4fa5da3c743803f05314d1
6
+ metadata.gz: 2478f7e0edfdda90f0b9f0755c06dfa23591675046ef5edc0c3ec164bf7bf71d04429f238bcfac73e9eb51e61fed313d78a05cf26490f4dbbb1adc18e90933f5
7
+ data.tar.gz: e52a354376e24079d87799ca9c5a9b8b9edf15a6406d0291b8f2b3ce9e92bc90884496bca2638a135a9596588fd93ac61fbd709c6c86589cc437135c523b57b5
@@ -55,7 +55,7 @@ module EventQ
55
55
  end
56
56
 
57
57
  def aws_safe_name(name)
58
- return name.gsub(':', '')
58
+ return name[0..79].gsub(/[^a-zA-Z\d_\-]/,'')
59
59
  end
60
60
 
61
61
  end
@@ -194,9 +194,10 @@ module EventQ
194
194
 
195
195
  message_args = EventQ::MessageArgs.new(message.type, retry_attempts)
196
196
 
197
- EventQ.log(:debug, "[#{self.class}] - Message received. Retry Attempts: #{retry_attempts}")
197
+ EventQ.log(:info, "[#{self.class}] - Message received. Retry Attempts: #{retry_attempts}")
198
198
 
199
199
  if(!EventQ::NonceManager.is_allowed?(message.id))
200
+ EventQ.log(:info, "[#{self.class}] - Duplicate Message received. Dropping message.")
200
201
  client.sqs.delete_message({ queue_url: q, receipt_handle: msg.receipt_handle })
201
202
  return false
202
203
  end
@@ -223,7 +224,6 @@ module EventQ
223
224
 
224
225
  if message_args.abort || error
225
226
  EventQ::NonceManager.failed(message.id)
226
- EventQ.log(:info, "[#{self.class}] - Message rejected.")
227
227
  reject_message(queue, client, msg, q, retry_attempts)
228
228
  else
229
229
  EventQ::NonceManager.complete(message.id)
@@ -235,15 +235,18 @@ module EventQ
235
235
  def reject_message(queue, client, msg, q, retry_attempts)
236
236
 
237
237
  if !queue.allow_retry || retry_attempts >= queue.max_retry_attempts
238
+
239
+ EventQ.log(:info, "[#{self.class}] - Message rejected removing from queue. Msg: #{serialize_message(msg)}")
240
+
238
241
  #remove the message from the queue so that it does not get retried again
239
242
  client.sqs.delete_message({ queue_url: q, receipt_handle: msg.receipt_handle })
240
243
 
241
244
  if retry_attempts >= queue.max_retry_attempts
242
245
 
243
- EventQ.log(:info, "[#{self.class}] - Message retry attempt limit exceeded. Msg: #{serialize_message(msg)}")
246
+ EventQ.log(:info, "[#{self.class}] - Message retry attempt limit exceeded.")
244
247
 
245
248
  if @retry_exceeded_block != nil
246
- EventQ.log(:debug, "[#{self.class}] - Executing retry exceeded block.")
249
+ EventQ.log(:info, "[#{self.class}] - Executing retry exceeded block.")
247
250
  @retry_exceeded_block.call(message)
248
251
  end
249
252
 
@@ -253,6 +256,8 @@ module EventQ
253
256
 
254
257
  retry_attempts += 1
255
258
 
259
+ EventQ.log(:info, "[#{self.class}] - Message rejected requesting retry. Attempts: #{retry_attempts}")
260
+
256
261
  if queue.allow_retry_back_off == true
257
262
  EventQ.log(:debug, "[#{self.class}] - Calculating message back off retry delay. Attempts: #{retry_attempts} * Delay: #{queue.retry_delay}")
258
263
  visibility_timeout = (queue.retry_delay * retry_attempts) / 1000
@@ -1,5 +1,5 @@
1
1
  module EventQ
2
2
  module Amazon
3
- VERSION = "1.6.3"
3
+ VERSION = "1.6.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventq_aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage