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 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.unsubscribe
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.unsubscribe
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.unsubscribe
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sensu"
3
- s.version = "0.5.9"
3
+ s.version = "0.5.10"
4
4
  s.authors = ["Sean Porter", "Justin Kolberg"]
5
5
  s.email = ["sean.porter@sonian.net", "justin.kolberg@sonian.net"]
6
6
  s.homepage = "https://github.com/sonian/sensu"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sensu
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.9
5
+ version: 0.5.10
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sean Porter