This is one way we could handle moving the logic in RetryMiddleware to a Retrier class, to make it generally available as a callable retrier in other classes.
After discussing with @ajupazhamayil and @saranshdhingra , we are going to continue using ExponentialBackoff in google/cloud-core instead of moving to a combined approach, as this PR illustrates a lot of complexity that makes this approach less optimal.
This is one way we could handle moving the logic in
RetryMiddleware
to aRetrier
class, to make it generally available as a callable retrier in other classes.After discussing with @ajupazhamayil and @saranshdhingra , we are going to continue using
ExponentialBackoff
ingoogle/cloud-core
instead of moving to a combined approach, as this PR illustrates a lot of complexity that makes this approach less optimal.