Skip to content

Commit

Permalink
MU.retrier: no ternary operator syntax for you
Browse files Browse the repository at this point in the history
  • Loading branch information
jstange committed Mar 4, 2020
1 parent fe4dbb2 commit c2bd3ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/mu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ def self.retrier(catchme = nil, wait: 30, max: 0, ignoreme: [], on_retry: nil, a
if catchme and catchme.include?(e.class)
if max > 0 and retries >= max
always.call if always and always.is_a?(Proc)
ignoreme.include?(e.class) ? return : raise e
if ignoreme.include?(e.class)
return
else
raise e
end
end

if on_retry and on_retry.is_a?(Proc)
Expand Down

0 comments on commit c2bd3ff

Please sign in to comment.