Module: Shutl::NetworkRetry
Instance Attribute Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#notifier_klass ⇒ Object
24 25 26 |
# File 'lib/shutl/network_retry.rb', line 24 def notifier_klass @notifier_klass ||= Airbrake end |
Instance Method Details
#retry(message = "Notice: Network Exception", default = nil) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/shutl/network_retry.rb', line 15 def retry = "Notice: Network Exception", default=nil Retriable.retriable(retry_settings) { yield } rescue *network_exceptions => e notifier_klass.notify(e, error_message: ) default end |