lib/ring/sqa/alarm.rb in ring-sqa-0.1.0 vs lib/ring/sqa/alarm.rb in ring-sqa-0.1.1

- old
+ new

@@ -17,17 +17,17 @@ Log.info msg[:short] @methods.each { |alarm_method| alarm_send alarm_method, 'raise', msg, alarm_buffer } end end - def clear + def clear alarm_buffer if @alarm == true @alarm = false msg = { short: "#{@hostname}: clearing #{@afi} alarm" } msg[:long] = msg[:short] Log.info msg[:short] - @methods.each { |alarm_method| alarm_send alarm_method, 'clear', msg, nil } + @methods.each { |alarm_method| alarm_send alarm_method, 'clear', msg, alarm_buffer } end end private @@ -70,15 +70,16 @@ msg[:long] = message nodes_list, mtr_list, buffer_list, exceeding_nodes.size msg end - def alarm_send alarm_method, status, msg, alarm_buffer=nil + def alarm_send alarm_method, status, msg, alarm_buffer alarm_method.send(short: msg[:short], long: msg[:long], status: status, alarm_buffer: alarm_buffer, - nodes: @nodes) + nodes: @nodes, + afi: @afi) end end end