From 802edec157b204e68851142df94296ec013e2847 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Wed, 12 Dec 2012 14:36:37 +0000 Subject: The suppression periods are now configurable too --- lib/custodian/alerts/mauve.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/custodian/alerts') diff --git a/lib/custodian/alerts/mauve.rb b/lib/custodian/alerts/mauve.rb index a467215..7f06dfd 100644 --- a/lib/custodian/alerts/mauve.rb +++ b/lib/custodian/alerts/mauve.rb @@ -99,19 +99,25 @@ module Custodian day_start = @settings.key( "day_start" ) || 10 day_end = @settings.key( "day_end" ) || 18 + # + # In hour suppress + # + working_suppress = @settings.key( "working_suppress" ) || 4 + oncall_suppress = @settings.key( "oncall_suppress" ) || 10 + # # If we're Monday-Friday, between the start & end time, then # we're in the working day. # if ( ( ( wday != 0 ) && ( wday != 6 ) ) && - ( hour >= day_start && < day_end ) ) + ( hour >= day_start && hour < day_end ) ) working = true end # # The suppression period can now be determined. # - period = working ? 4 : 10 + period = working ? working_suppress : oncall_suppress # # And logged. -- cgit v1.2.1