@bcwaldon You can look at https://github.com/cenkalti/backoff, maybe it is useful here.