lib/riemann/babbler/plugin.rb in riemann-babbler-0.1.8 vs lib/riemann/babbler/plugin.rb in riemann-babbler-0.1.9
- old
+ new
@@ -43,12 +43,12 @@
hostname = options.riemann.prefix + hostname unless options.riemann.prefix.nil?
hostname
end
# не запускаем плагин есть
- def not_run_plugin
- false
+ def run_plugin
+ true
end
def riemann
@riemann ||= Riemann::Client.new(
:host => options.riemann.host,
@@ -56,10 +56,11 @@
)
end
alias :r :riemann
def run
- return 0 if not_run_plugin
+ # выйти если run_plugin не равен true
+ return 0 unless run_plugin == true
t0 = Time.now
loop do
begin
tick
rescue => e