8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/exception_notification_moderate/exception_notifier.rb', line 8
def notify_exception(exception, options={})
ex_key = exception_key(exception)
begin
val = redis.get(ex_key)
rescue Redis::CannotConnectError
end
if val && val.to_i + 60 > Time.now.to_i
ExceptionNotificationModerate.logger.info(exception)
return false
end
begin
redis.set(ex_key, Time.now.to_i)
rescue Redis::CannotConnectError
end
original_notify_exception(exception, options)
end
|