osbourne 1.2 → 1.2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/osbourne/launcher.rb +7 -4
- data/lib/osbourne/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: 2c8d93dcd215b3b682317547b30a3310243f32470770ab5d0135d059251816c5
|
4
|
+
data.tar.gz: 206ebb53ef3c90e3af4ac4eea04d7b57cea708cf499aef137b60d6fdeeda71b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d99a942684efcbd1e48c39b9d9018e3ba8c7e4c8fabee694ea534838b7bc2303e29a7fd94f96e159bc5f640168366dee2886fb43de12aeb552ce9c4820535b8a
|
7
|
+
data.tar.gz: 316e2ca6934e3b4fc9616b137ebd4712ad3bdbd5dee3c26a0eb1bd658f7a446da4dced124a2246449ed68c348c9356108692812eb884aae087e70f45b8376753
|
data/lib/osbourne/launcher.rb
CHANGED
@@ -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.
|
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[:
|
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.
|
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.
|
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
|
data/lib/osbourne/version.rb
CHANGED
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:
|
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
|
+
date: 2018-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|