re-retrying icon indicating copy to clipboard operation
re-retrying copied to clipboard

For logging purposes, provide approximate delay until next retry

Open rhuffman opened this issue 7 years ago • 0 comments

In a current project I have a RetryListener that provides debug output for each retry. I would really like for it to log when the next attempt will be made (if any). However, the Attempt does not contain that data.

A WaitStrategy, given the most recent failed Attempt, calculates the amount of time the Retryer should sleep before making another attempt. If the ResultAttempt and ExceptionAttempt took the WaitStrategy, the delay before the next retry could be calculated and saved as a field. Then the RetryListener could log that.

rhuffman avatar Oct 04 '17 12:10 rhuffman