lib/laximo.rb in laximo-0.9.1 vs lib/laximo.rb in laximo-0.9.2

- old
+ new

@@ -34,9 +34,30 @@ def oem ::Laximo::Oem.new end + def tryer(try_iter: 5, time: 25) + + begin + + cl = caller_locations(1,1).first + yield + + rescue ::Laximo::SoapTooManyRequestError + + try_iter = try_iter - 1 + + puts "[#{cl}] Waiting #{time} sec..." + sleep time + + retry if try_iter > 0 + raise + + end + + end + def deprecated! puts "***" puts "*** DEPRECATION WARNING! Method `#{caller[0][/`.*'/][1..-2]}` is deprecated and will not support in the future" puts "***"