diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-31 12:19:48 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-31 12:19:48 +0100 |
commit | b87b69ca3fb266bdb5de88b9e77da54e23e370a5 (patch) | |
tree | 94698670ecd9b8562ae41b0ab793fac821f91f97 /lib/mauve/configuration_builders | |
parent | 36543941d784715e962599f7bf73f4680387e610 (diff) |
Fixed up alert suppression to be less jumpy
Diffstat (limited to 'lib/mauve/configuration_builders')
-rw-r--r-- | lib/mauve/configuration_builders/person.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/mauve/configuration_builders/person.rb b/lib/mauve/configuration_builders/person.rb index 1f2af71..014987f 100644 --- a/lib/mauve/configuration_builders/person.rb +++ b/lib/mauve/configuration_builders/person.rb @@ -41,6 +41,7 @@ module Mauve def suppress_notifications_after(h) raise ArgumentError.new("notification_threshold must be specified as e.g. (10 => 1.minute)") unless h.kind_of?(Hash) && h.keys[0].kind_of?(Integer) && h.values[0].kind_of?(Integer) + @result.notification_thresholds[h.values[0]] = Array.new(h.keys[0]) end end @@ -53,6 +54,10 @@ module Mauve def created_person(person) name = person.username raise BuildException.new("Duplicate person '#{name}'") if @result.people[name] + # + # Add a default notification threshold + # + person.notification_thresholds[60] = Array.new(10) if person.notification_thresholds.empty? @result.people[person.username] = person end |