flapjack 0.6.26 → 0.6.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/dist/etc/init.d/flapjack +1 -0
- data/lib/flapjack/jabber.rb +9 -5
- data/lib/flapjack/version.rb +1 -1
- metadata +1 -1
data/dist/etc/init.d/flapjack
CHANGED
data/lib/flapjack/jabber.rb
CHANGED
@@ -19,6 +19,7 @@ require 'yajl/json_gem'
|
|
19
19
|
require 'flapjack/data/entity_check'
|
20
20
|
require 'flapjack/pikelet'
|
21
21
|
require 'flapjack/utility'
|
22
|
+
require 'flapjack/version'
|
22
23
|
|
23
24
|
module Flapjack
|
24
25
|
|
@@ -162,8 +163,9 @@ module Flapjack
|
|
162
163
|
|
163
164
|
when command =~ /^identify$/
|
164
165
|
t = Process.times
|
165
|
-
|
166
|
-
msg = "Flapjack process #{Process.pid} on #{`hostname -f`.chomp} \n"
|
166
|
+
boot_time = Time.at(@redis_handler.get('boot_time').to_i)
|
167
|
+
msg = "Flapjack #{Flapjack::VERSION} process #{Process.pid} on #{`hostname -f`.chomp} \n"
|
168
|
+
msg += "Boot time: #{boot_time}\n"
|
167
169
|
msg += "User CPU Time: #{t.utime}\n"
|
168
170
|
msg += "System CPU Time: #{t.stime}\n"
|
169
171
|
msg += `uname -a`.chomp + "\n"
|
@@ -275,9 +277,11 @@ module Flapjack
|
|
275
277
|
logger.debug('jabber notification event received')
|
276
278
|
logger.debug(event.inspect)
|
277
279
|
if 'shutdown'.eql?(type)
|
278
|
-
|
279
|
-
|
280
|
-
|
280
|
+
if should_quit?
|
281
|
+
EM.next_tick do
|
282
|
+
# get delays without the next_tick
|
283
|
+
close # Blather::Client.close
|
284
|
+
end
|
281
285
|
end
|
282
286
|
# FIXME: should we also set something so should_quit? returns true
|
283
287
|
# to prevent retrieving more notifications from the queue while closing?
|
data/lib/flapjack/version.rb
CHANGED