sensu 0.14.0-java → 0.15.0.beta.1-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 328d24e5e21e7d4ae6f0d39723a6a6e7f7725df9
4
- data.tar.gz: 34a1af82a31abf17d0c481960923244fabb140d6
3
+ metadata.gz: f1055408b4fb4a2fd220e4bf8c1566d9b169e4be
4
+ data.tar.gz: fae5db2afdf20354911471d3bcf37bb78cc259ed
5
5
  SHA512:
6
- metadata.gz: bfd5d13ed7e66cb3cde4d50b904dbfff4d5447f72425a8ea5822301d228bb3ccd06edf41429d2908994e4c41070905c7e55554d57d2e2f28b401360f238f2c00
7
- data.tar.gz: bb0f2ecf54df0a04c5f9ee7ad2bf279b8702e6747a6a289575caffa16dfba4edcc24f7fa6b58b84f28aec9edff3431bd42c3d40e5558d248336d753e7a3b75d5
6
+ metadata.gz: 290a55ba701322935d0457486c18d168cd7db68beea2feb99f7ec7db287573965861659c8eacbeb8ede86b59c7ee9d5511949acad5d46232839eb82ba06a4f4c
7
+ data.tar.gz: 91c1b5eeac505146d535f238ed87285a2d3cb183db1985146c6f6a3c59d6fb3298303b11a2fc02057ddaded58f9e67bf78a1a507d7fefec5d26c8e558cd674e6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.15.0 - TBD
2
+
3
+ ### Features
4
+
5
+ RabbitMQ transport now supports multiple broker connection options,
6
+ enabling connection fail-over to brokers in a cluster without
7
+ using a load balancer.
8
+
1
9
  ## 0.14.0 - 2014-09-29
2
10
 
3
11
  ### Features
data/lib/sensu/client.rb CHANGED
@@ -44,9 +44,7 @@ module Sensu
44
44
  @logger.debug('scheduling keepalives')
45
45
  publish_keepalive
46
46
  @timers[:run] << EM::PeriodicTimer.new(20) do
47
- unless @state == :paused
48
- publish_keepalive
49
- end
47
+ publish_keepalive
50
48
  end
51
49
  end
52
50
 
@@ -195,10 +193,8 @@ module Sensu
195
193
  @timers[:run] << EM::Timer.new(scheduling_delay) do
196
194
  interval = testing? ? 0.5 : check[:interval]
197
195
  @timers[:run] << EM::PeriodicTimer.new(interval) do
198
- unless @state == :paused
199
- check[:issued] = Time.now.to_i
200
- process_check(check.dup)
201
- end
196
+ check[:issued] = Time.now.to_i
197
+ process_check(check.dup)
202
198
  end
203
199
  end
204
200
  end
@@ -247,21 +243,46 @@ module Sensu
247
243
  end
248
244
  end
249
245
 
250
- def start
251
- setup_transport
246
+ def bootstrap
252
247
  setup_keepalives
253
248
  setup_subscriptions
254
249
  setup_standalone
250
+ @state = :running
251
+ end
252
+
253
+ def start
254
+ setup_transport
255
255
  setup_sockets
256
- super
256
+ bootstrap
257
+ end
258
+
259
+ def pause
260
+ unless @state == :pausing || @state == :paused
261
+ @state = :pausing
262
+ @timers[:run].each do |timer|
263
+ timer.cancel
264
+ end
265
+ @timers[:run].clear
266
+ @transport.unsubscribe
267
+ @state = :paused
268
+ end
269
+ end
270
+
271
+ def resume
272
+ retry_until_true(1) do
273
+ if @state == :paused
274
+ if @transport.connected?
275
+ bootstrap
276
+ true
277
+ end
278
+ end
279
+ end
257
280
  end
258
281
 
259
282
  def stop
260
283
  @logger.warn('stopping')
261
- @timers[:run].each do |timer|
262
- timer.cancel
263
- end
264
- @transport.unsubscribe
284
+ pause
285
+ @state = :stopping
265
286
  complete_checks_in_progress do
266
287
  @transport.close
267
288
  super
@@ -1,6 +1,6 @@
1
1
  module Sensu
2
2
  unless defined?(Sensu::VERSION)
3
- VERSION = '0.14.0'
3
+ VERSION = '0.15.0.beta.1'
4
4
 
5
5
  SEVERITIES = %w[ok warning critical unknown]
6
6
 
data/lib/sensu/daemon.rb CHANGED
@@ -7,7 +7,7 @@ gem 'sensu-logger', '1.0.0'
7
7
  gem 'sensu-settings', '1.2.0'
8
8
  gem 'sensu-extension', '1.0.0'
9
9
  gem 'sensu-extensions', '1.0.0'
10
- gem 'sensu-transport', '1.0.0'
10
+ gem 'sensu-transport', '2.0.0'
11
11
  gem 'sensu-spawn', '1.1.0'
12
12
 
13
13
  require 'time'
data/lib/sensu/server.rb CHANGED
@@ -727,7 +727,7 @@ module Sensu
727
727
  bootstrap
728
728
  end
729
729
 
730
- def pause(&block)
730
+ def pause
731
731
  unless @state == :pausing || @state == :paused
732
732
  @state = :pausing
733
733
  @timers[:run].each do |timer|
@@ -737,9 +737,6 @@ module Sensu
737
737
  unsubscribe
738
738
  resign_as_master
739
739
  @state = :paused
740
- if block
741
- block.call
742
- end
743
740
  end
744
741
  end
745
742
 
@@ -756,13 +753,12 @@ module Sensu
756
753
 
757
754
  def stop
758
755
  @logger.warn('stopping')
759
- pause do
760
- @state = :stopping
761
- complete_handlers_in_progress do
762
- @redis.close
763
- @transport.close
764
- super
765
- end
756
+ pause
757
+ @state = :stopping
758
+ complete_handlers_in_progress do
759
+ @redis.close
760
+ @transport.close
761
+ super
766
762
  end
767
763
  end
768
764
  end
data/sensu.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency('sensu-settings', '1.2.0')
22
22
  s.add_dependency('sensu-extension', '1.0.0')
23
23
  s.add_dependency('sensu-extensions', '1.0.0')
24
- s.add_dependency('sensu-transport', '1.0.0')
24
+ s.add_dependency('sensu-transport', '2.0.0')
25
25
  s.add_dependency('sensu-spawn', '1.1.0')
26
26
  s.add_dependency('em-redis-unified', '0.5.0')
27
27
  s.add_dependency('sinatra', '1.3.5')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0.beta.1
5
5
  platform: java
6
6
  authors:
7
7
  - Sean Porter
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-30 00:00:00.000000000 Z
12
+ date: 2014-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json
@@ -115,12 +115,12 @@ dependencies:
115
115
  requirements:
116
116
  - - '='
117
117
  - !ruby/object:Gem::Version
118
- version: 1.0.0
118
+ version: 2.0.0
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - '='
122
122
  - !ruby/object:Gem::Version
123
- version: 1.0.0
123
+ version: 2.0.0
124
124
  prerelease: false
125
125
  type: :runtime
126
126
  - !ruby/object:Gem::Dependency
@@ -265,9 +265,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
265
265
  version: '0'
266
266
  required_rubygems_version: !ruby/object:Gem::Requirement
267
267
  requirements:
268
- - - '>='
268
+ - - '>'
269
269
  - !ruby/object:Gem::Version
270
- version: '0'
270
+ version: 1.3.1
271
271
  requirements: []
272
272
  rubyforge_project:
273
273
  rubygems_version: 2.1.9