diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-19 14:11:52 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-19 14:11:52 +0100 |
commit | 638a0cb31b5dd3c0131035c19c14e0ac709a9a2e (patch) | |
tree | 601104ed74c1bf8d9df6c8f629b8695f778fbf9d /lib/mauve/person.rb | |
parent | cdd1b094b27960595a8750247c5b2f2576cd5872 (diff) |
Added note-ability (fixes 1146)
Removed threaded notifications cos we don't need em. (ftw!)
Diffstat (limited to 'lib/mauve/person.rb')
-rw-r--r-- | lib/mauve/person.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/mauve/person.rb b/lib/mauve/person.rb index 64ed07e..e52b644 100644 --- a/lib/mauve/person.rb +++ b/lib/mauve/person.rb @@ -176,10 +176,14 @@ module Mauve return true end + + # FIXME current_alerts is very slow. So much so it slows everything + # down. A lot. result = NotificationCaller.new( self, alert, - current_alerts, + [], + # current_alerts, {:is_suppressed => @suppressed, :was_suppressed => was_suppressed, } ).instance_eval(&__send__(level)) @@ -202,8 +206,12 @@ module Mauve return false end + # # Returns the subset of current alerts that are relevant to this Person. # + # This is currently very CPU intensive, and slows things down a lot. So + # I've commented it out when sending notifications. + # def current_alerts Alert.all_raised.select do |alert| my_last_update = AlertChanged.first(:person => username, :alert_id => alert.id) |