-
Notifications
You must be signed in to change notification settings - Fork 36
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
call cleanup hook only if we decide to have next attempt #62
Comments
Some cleanup involves doing something before the next attempt to ensure the next attempts succeeds. I can also conceive of a case where cleanup needs to be done after the last attempt, to reset some state (for whatever might be running next), or possibly even remove some secrets that you don't want hanging around. I'm not really sure what the more common case is, so it's tough to say which we should optimize for. In any case,
|
It's okay for |
Yeah, that's true. If we move the change when the cleanup happens in |
Right, incompatibility is scary. Other ideas:
|
Incompatibility is OK, I just think we should change this without a compelling reason.
This is an interesting idea. It feels like a very appropriate thing to be passed to the It would be nice to use some introspection to not cause a breaking change. This can be done by using |
What I mean is, change original code from
to
Two benefits of this change:
For original behavior (do something after exception), it could be done inside action() using normal try..except.
How do you think? If you think it is good change, I can send PR.
The text was updated successfully, but these errors were encountered: