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

Updates unmaintained tokio-retry to tokio-retry2 #311

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

naomijub
Copy link
Contributor

tokio-retry has been unmaintained for over 3 years now, so this new crate, tokio-retry2, is being used by my project.

It has new features like the ability to early exit with wrapping errors (RetryError::Permanent), or continue the retry loop (RetryError::Transient). I noticed that for the specific case should_retry has been used, using RetryError should be simple. As well a notification on fail system (which was not included in this PR, but can be easily done replacing Retry::spawn(..) with Retry::spawn_notify(..)) . In the case of RetryIf notification is expected by default, and I noticed the codebase was using a notification system with trace, so I moved it to the notification function of it.

@naomijub
Copy link
Contributor Author

I could not run Github Actions on my side

@yoshidan yoshidan added the safe to test safe to test label Sep 20, 2024
@yoshidan yoshidan merged commit 5d0bb4d into yoshidan:main Sep 21, 2024
9 checks passed
@yoshidan
Copy link
Owner

Thanks!

@naomijub
Copy link
Contributor Author

Thanks!

Do you want me to do the improvements I mentioned?

@yoshidan
Copy link
Owner

Yes, I was thanking you for this PR,
I would really appreciate it if you could also improve the logic.

@naomijub
Copy link
Contributor Author

Will do soon-ish

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

Successfully merging this pull request may close these issues.

2 participants