Module: Daemon::Utils::Retry

Defined in:
lib/onapp/engine/utils/retry.rb

Constant Summary

SLEEP =
5

Class Method Summary (collapse)

Class Method Details

+ (Object) retry(*on, on_error: proc {}, sleep: SLEEP, tries: Float::INFINITY, &block)



8
9
10
11
12
13
14
15
16
# File 'lib/onapp/engine/utils/retry.rb', line 8

def self.retry(*on, on_error: proc {}, sleep: SLEEP, tries: Float::INFINITY, &block)
  opts = {
    tries: tries,
    exception_cb: on_error,
    sleep: sleep,
    on: on
  }
  Retryable.retryable(opts, &block)
end