Module: AirbrakeProxy
- Extended by:
- AirbrakeProxy, Configure
- Included in:
- AirbrakeProxy
- Defined in:
- lib/airbrake_proxy.rb,
lib/airbrake_proxy/version.rb,
lib/airbrake_proxy/configure.rb,
lib/airbrake_proxy/configuration.rb
Defined Under Namespace
Modules: Configure
Classes: Configuration, TooManyNotification
Constant Summary
collapse
- VERSION =
"0.1.2"
Instance Attribute Summary
Attributes included from Configure
#configuration
Instance Method Summary
collapse
Methods included from Configure
configure
Instance Method Details
#clean! ⇒ Object
32
33
34
|
# File 'lib/airbrake_proxy.rb', line 32
def clean!
_keys.each { |key| RedisProxy.del(key) }
end
|
#keys ⇒ Object
28
29
30
|
# File 'lib/airbrake_proxy.rb', line 28
def keys
_keys.map { |key| [key, RedisProxy.get(key)] }
end
|
#notify(exception, params) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/airbrake_proxy.rb', line 16
def notify(exception, params)
unless exception
logger.error("AirbrakeProxy#notify(#{exception}, #{params}) => called without exception")
return false
end
safe_notify(exception) { Airbrake.notify(exception, params) }
true
rescue TooManyNotification => e
logger.info("AirbrakeProxy => #{e.message}")
end
|
#remove(key) ⇒ Object
36
37
38
39
40
41
42
|
# File 'lib/airbrake_proxy.rb', line 36
def remove(key)
if key.match(KEY_PREFIX)
RedisProxy.del(key) == 1 ? true : false
else
false
end
end
|