Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom routine for last attempt (giving up) #32

Open
pinx opened this issue Feb 28, 2023 · 0 comments
Open

Custom routine for last attempt (giving up) #32

pinx opened this issue Feb 28, 2023 · 0 comments

Comments

@pinx
Copy link

pinx commented Feb 28, 2023

We want to log retries and 'giving up' with its own message.
I now implemented this with a condition in the Retry:
if (attempt < MaxAttempts) {normal behavior} else {custom log message}
with MaxAttempts one higher than the actual number of attempts.

I'm not sure what the most elegant solution would be. Maybe a fluent method like GiveUpWith() after Retry?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant