sensu 0.9.3 → 0.9.4.beta

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Sensu
2
- VERSION = "0.9.3"
2
+ VERSION = "0.9.4.beta"
3
3
  end
@@ -130,7 +130,8 @@ module Sensu
130
130
 
131
131
  def setup_subscriptions
132
132
  @logger.debug('[subscribe] -- setup subscriptions')
133
- @check_request_queue = @amq.queue(String.unique, :exclusive => true)
133
+ @uniq_queue_name ||= rand(36**32).to_s(36)
134
+ @check_request_queue = @amq.queue(@uniq_queue_name, :auto_delete => true)
134
135
  @settings.client.subscriptions.uniq.each do |exchange|
135
136
  @logger.debug('[subscribe] -- queue binding to exchange -- ' + exchange)
136
137
  @check_request_queue.bind(@amq.fanout(exchange))
@@ -147,10 +148,7 @@ module Sensu
147
148
  @timers << EM::PeriodicTimer.new(5) do
148
149
  unless @check_request_queue.subscribed?
149
150
  @logger.warn('[monitor] -- re-subscribing to subscriptions')
150
- @check_request_queue.delete
151
- @timers << EM::Timer.new(1) do
152
- setup_subscriptions
153
- end
151
+ setup_subscriptions
154
152
  end
155
153
  end
156
154
  end
@@ -19,6 +19,9 @@ module Redis
19
19
  until @queue.empty?
20
20
  @queue.shift.fail RuntimeError.new 'connection closed'
21
21
  end
22
+ unless @connected
23
+ raise "could not connect to redis"
24
+ end
22
25
  end
23
26
  end
24
27
  end
@@ -45,12 +45,6 @@ class Hash
45
45
  end
46
46
  end
47
47
 
48
- class String
49
- def self.unique(chars=32)
50
- rand(36**chars).to_s(36)
51
- end
52
- end
53
-
54
48
  module Process
55
49
  def self.write_pid(pid_file)
56
50
  if pid_file.nil?
@@ -26,7 +26,6 @@ Gem::Specification.new do |s|
26
26
  s.add_development_dependency("rake")
27
27
  s.add_development_dependency("em-spec")
28
28
  s.add_development_dependency("em-http-request")
29
- s.add_development_dependency("rbtrace")
30
29
 
31
30
  s.files = Dir.glob("{bin,lib}/**/*") + %w[sensu.gemspec README.org MIT-LICENSE.txt]
32
31
  s.executables = Dir.glob("bin/**/*").map { |file| File.basename(file) }
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
5
- prerelease: false
4
+ hash: 31098137
5
+ prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 3
10
- version: 0.9.3
9
+ - 4
10
+ - beta
11
+ version: 0.9.4.beta
11
12
  platform: ruby
12
13
  authors:
13
14
  - Sean Porter
@@ -16,7 +17,7 @@ autorequire:
16
17
  bindir: bin
17
18
  cert_chain: []
18
19
 
19
- date: 2012-01-31 00:00:00 -08:00
20
+ date: 2012-02-13 00:00:00 -08:00
20
21
  default_executable:
21
22
  dependencies:
22
23
  - !ruby/object:Gem::Dependency
@@ -211,20 +212,6 @@ dependencies:
211
212
  version: "0"
212
213
  type: :development
213
214
  version_requirements: *id013
214
- - !ruby/object:Gem::Dependency
215
- name: rbtrace
216
- prerelease: false
217
- requirement: &id014 !ruby/object:Gem::Requirement
218
- none: false
219
- requirements:
220
- - - ">="
221
- - !ruby/object:Gem::Version
222
- hash: 3
223
- segments:
224
- - 0
225
- version: "0"
226
- type: :development
227
- version_requirements: *id014
228
215
  description: A monitoring framework that aims to be simple, malleable, and scalable. Uses the publish/subscribe model.
229
216
  email:
230
217
  - sean.porter@sonian.net
@@ -272,12 +259,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
272
259
  required_rubygems_version: !ruby/object:Gem::Requirement
273
260
  none: false
274
261
  requirements:
275
- - - ">="
262
+ - - ">"
276
263
  - !ruby/object:Gem::Version
277
- hash: 3
264
+ hash: 25
278
265
  segments:
279
- - 0
280
- version: "0"
266
+ - 1
267
+ - 3
268
+ - 1
269
+ version: 1.3.1
281
270
  requirements: []
282
271
 
283
272
  rubyforge_project: