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