aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/person.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mauve/person.rb')
-rw-r--r--lib/mauve/person.rb10
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)