Improve retry functionality in a few ways#64
Conversation
|
Looks good to me, though I am wondering if it would save trouble to just update retry and retry_call to also use RETRY_DEFAULTS . |
Not sure how much trouble it would save. Certainly this would change some existing behavior in ways that were not intended in the original, e.g. |
|
Yep, I'm only worried for maintainability that there's both the RETRY_DEFAULTS and the defaults that are baked-in to the other/older methods. So really RETRY_DEFAULTS doesn't seem to deserve being a module var. But there isn't that much code in here so I'm not passionate about any change. |
jeanconn
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the discussion about defaults.
|
Maybe it should be called |
Description
This addresses some shortcomings in the
ska_helpers.retrymodule along with general improvements:retry_funcfor more convenient wrapping of functions.triesfrom-1(infinite retries) to3.__all__in a more typical way and use this in the package__init__.pyimport.caplog).Interface impacts
Retry defaults are changed, but no code in Ska was using the default since it was useless.
Testing
Unit tests
Independent check of unit tests by Jean
Functional tests
Some functional testing in related testing: