Retry
#
RetryRetry is similar to eventually, but rather than attempt a block of code for a period of time, it attempts a block of code a maximum number of times. We still provide a timeout period to avoid the loop running for ever.
Additional options include the delay between runs, a multiplier to use exponential delays, and an exception class if we only want to repeat for certain exceptions and fail for others.