osbourne 1.2 → 1.2.0.1

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
  SHA256:
3
- metadata.gz: 4cc955a9e0ea8360e5f14cb22de9f7d48c56b0607a66652bfe0410a712b7d17d
4
- data.tar.gz: 605a96f1cd91e57a572fb235c4e1e95d75a37d31b776dce4870658d300cb2f15
3
+ metadata.gz: 2c8d93dcd215b3b682317547b30a3310243f32470770ab5d0135d059251816c5
4
+ data.tar.gz: 206ebb53ef3c90e3af4ac4eea04d7b57cea708cf499aef137b60d6fdeeda71b2
5
5
  SHA512:
6
- metadata.gz: a74fc022d08f297ff54e6aff4192fa8126a4f93d96ee8118faec2a1f21f046deb12e4d4c272cfc863460d9efcff41262671f34948c73a94d6c3cf9ac1cd09f48
7
- data.tar.gz: 97f79d13c2b3440f8528fdd767e537f0fdc1ae5f6a61cd2dbd9129d97920b5ae7c80b819c1a0e69e44755f9c07e2795b9d759cdf12ad78395e66b0139c9a5633
6
+ metadata.gz: d99a942684efcbd1e48c39b9d9018e3ba8c7e4c8fabee694ea534838b7bc2303e29a7fd94f96e159bc5f640168366dee2886fb43de12aeb552ce9c4820535b8a
7
+ data.tar.gz: 316e2ca6934e3b4fc9616b137ebd4712ad3bdbd5dee3c26a0eb1bd658f7a446da4dced124a2246449ed68c348c9356108692812eb884aae087e70f45b8376753
@@ -29,7 +29,7 @@ module Osbourne
29
29
 
30
30
  def global_polling_threads
31
31
  Osbourne::WorkerBase.descendants.map do |worker|
32
- Osbourne.logger.debug("[Osbourne] Spawning thread for #{worker.name}")
32
+ Osbourne.logger.info("[Osbourne] Spawning thread for #{worker.name}")
33
33
  Thread.new do
34
34
  loop do
35
35
  poll(worker)
@@ -48,15 +48,16 @@ module Osbourne
48
48
  end
49
49
 
50
50
  def poll(worker)
51
- worker.polling_queue.poll(wait_time_seconds: worker.config[:max_wait_time],
51
+ worker.polling_queue.poll(wait_time_seconds: worker.config[:max_wait],
52
52
  max_number_of_messages: worker.config[:max_batch_size],
53
53
  idle_timeout: worker.config[:idle_timeout],
54
54
  skip_delete: true) do |messages|
55
- Osbourne.logger.debug("[Osbourne] Recieved #{messages.count} on #{worker.name}")
55
+ Osbourne.logger.info("[Osbourne] Recieved #{messages.count} on #{worker.name}")
56
56
  Array(messages).each {|msg| process(worker, Osbourne::Message.new(msg)) }
57
57
  throw :stop_polling if @stop
58
- Osbourne.logger.debug("[Osbourne] Waiting for more messages on #{worker.name} for max of #{worker.config[:max_wait_time]} seconds")
58
+ Osbourne.logger.info("[Osbourne] Waiting for more messages on #{worker.name} for max of #{worker.config[:max_wait]} seconds")
59
59
  end
60
+ Osbourne.logger.info("[Osbourne] Idle timeout on #{worker.name}")
60
61
  end
61
62
 
62
63
  private
@@ -71,6 +72,8 @@ module Osbourne
71
72
  worker.polling_queue.delete_message(message.message)
72
73
  rescue Exception => ex # rubocop:disable Lint/RescueException
73
74
  Osbourne.logger.error("[Osbourne] [MSG ID: #{message.id}] [#{ex.message}]\n #{ex.backtrace_locations.join("\n")}")
75
+ ensure
76
+ return # rubocop:disable Lint/EnsureReturn
74
77
  end
75
78
  end
76
79
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Osbourne
4
- VERSION = "1.2"
4
+ VERSION = "1.2.0.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osbourne
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: 1.2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Allen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-29 00:00:00.000000000 Z
11
+ date: 2018-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core