sensu 0.5.10 → 0.5.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sensu/client.rb +2 -1
- data/lib/sensu/server.rb +4 -2
- data/sensu.gemspec +1 -1
- metadata +1 -1
data/lib/sensu/client.rb
CHANGED
@@ -76,7 +76,8 @@ module Sensu
|
|
76
76
|
end
|
77
77
|
EM.add_periodic_timer(0.5) do
|
78
78
|
unless uniq_queue.subscribed?
|
79
|
-
uniq_queue.subscribe(:ack => true) do |check_json|
|
79
|
+
uniq_queue.subscribe(:ack => true) do |header, check_json|
|
80
|
+
header.ack
|
80
81
|
check = JSON.parse(check_json)
|
81
82
|
execute_check(check)
|
82
83
|
end
|
data/lib/sensu/server.rb
CHANGED
@@ -51,7 +51,8 @@ module Sensu
|
|
51
51
|
keepalive_queue = @amq.queue('keepalives')
|
52
52
|
EM.add_periodic_timer(0.5) do
|
53
53
|
unless keepalive_queue.subscribed?
|
54
|
-
keepalive_queue.subscribe(:ack => true) do |keepalive_json|
|
54
|
+
keepalive_queue.subscribe(:ack => true) do |header, keepalive_json|
|
55
|
+
header.ack
|
55
56
|
client = JSON.parse(keepalive_json)['name']
|
56
57
|
@redis.set('client:' + client, keepalive_json).callback do
|
57
58
|
@redis.sadd('clients', client)
|
@@ -134,7 +135,8 @@ module Sensu
|
|
134
135
|
result_queue = @amq.queue('results')
|
135
136
|
EM.add_periodic_timer(0.5) do
|
136
137
|
unless result_queue.subscribed?
|
137
|
-
result_queue.subscribe(:ack => true) do |result_json|
|
138
|
+
result_queue.subscribe(:ack => true) do |header, result_json|
|
139
|
+
header.ack
|
138
140
|
result = JSON.parse(result_json)
|
139
141
|
process_result(result)
|
140
142
|
end
|
data/sensu.gemspec
CHANGED