bosh-monitor 1.2743.0 → 1.2744.0

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: 6dbd7b9e24d40bd844a218dc80c9cdef8bdf9df2
4
- data.tar.gz: 1e1904fd5af05ce28bd109840d8cebbf930ca4f4
3
+ metadata.gz: f3d74bad04ccd85392b4ea8b8a957d176509fec6
4
+ data.tar.gz: d26c43893ce351737a668f4838ffa14199889508
5
5
  SHA512:
6
- metadata.gz: 79334734930a0c8f9378b33eddecbde3d52585db5f1c29061205f7bdc9b6f40f524ba7b60ffab6010c16b374edb03b06286279dcdd6f8b6fb3c027dd3a98c360
7
- data.tar.gz: 1d3a56eafe1f0404811ea5d01303e4cc07f210b9e2a5fdfa277a0e44358e65728fbc709bfd8efa7b4fa22016c3e992a888032ac216a9940ed03881e1d6f5e11b
6
+ metadata.gz: e781afcc0a7b9d45f59d5d5a4f3d72a5829d172bc88463224cc6c440b7781242fc4e6416521121fa8982b13c3b741220581929cc34776e31b3c15fa2440e29b6
7
+ data.tar.gz: 0360f71962a872a8d2596efe1a26a023917c986cb69f4918f5ed0b8d2c21f4bc62fe51a2593c8ba96e33f68f6c27ecfb66d0954f8d5df0f9dbcbef6ba2d1204d
@@ -48,16 +48,18 @@ module Bosh::Monitor
48
48
  @processor.add_plugin(lookup_plugin(plugin["name"], plugin["options"]), plugin["events"])
49
49
  end
50
50
 
51
- Bhm.nats.subscribe("hm.agent.heartbeat.*") do |message, reply, subject|
52
- process_event(:heartbeat, subject, message)
53
- end
51
+ EM.schedule do
52
+ Bhm.nats.subscribe("hm.agent.heartbeat.*") do |message, reply, subject|
53
+ process_event(:heartbeat, subject, message)
54
+ end
54
55
 
55
- Bhm.nats.subscribe("hm.agent.alert.*") do |message, reply, subject|
56
- process_event(:alert, subject, message)
57
- end
56
+ Bhm.nats.subscribe("hm.agent.alert.*") do |message, reply, subject|
57
+ process_event(:alert, subject, message)
58
+ end
58
59
 
59
- Bhm.nats.subscribe("hm.agent.shutdown.*") do |message, reply, subject|
60
- process_event(:shutdown, subject, message)
60
+ Bhm.nats.subscribe("hm.agent.shutdown.*") do |message, reply, subject|
61
+ process_event(:shutdown, subject, message)
62
+ end
61
63
  end
62
64
  end
63
65
 
@@ -7,11 +7,14 @@ module Bosh::Monitor
7
7
  end
8
8
 
9
9
  def subscribe
10
- @nats.subscribe('hm.director.alert') do |msg|
11
- alert = Yajl::Parser.parse(msg)
10
+ EM.schedule do
11
+ @nats.subscribe('hm.director.alert') do |message, _, subject|
12
+ @logger.debug("RECEIVED: #{subject} #{message}")
13
+ alert = Yajl::Parser.parse(message)
12
14
 
13
- if valid_payload?(alert)
14
- @event_processor.process(:alert, alert)
15
+ if valid_payload?(alert)
16
+ @event_processor.process(:alert, alert)
17
+ end
15
18
  end
16
19
  end
17
20
  end
@@ -35,7 +35,9 @@ module Bosh::Monitor
35
35
  end
36
36
 
37
37
  nats_subject = options["subject"] || SUBJECT
38
- @nats.publish(nats_subject, event.to_json)
38
+ EM.schedule do
39
+ @nats.publish(nats_subject, event.to_json)
40
+ end
39
41
  true
40
42
  end
41
43
  end
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Monitor
3
- VERSION = '1.2743.0'
3
+ VERSION = '1.2744.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2743.0
4
+ version: 1.2744.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-14 00:00:00.000000000 Z
11
+ date: 2014-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -138,7 +138,7 @@ dependencies:
138
138
  version: 1.6.0
139
139
  description: |-
140
140
  BOSH Health Monitor
141
- 01851c
141
+ 7460f0
142
142
  email: support@cloudfoundry.com
143
143
  executables:
144
144
  - bosh-monitor-console