python-zulip-api
python-zulip-api copied to clipboard
API: Improve exponential backoff implementation (add maximum)
For the python API, the exponential backoff could be improved through adding a maximum.
Motivated by the following conversation: https://chat.zulip.org/#narrow/stream/92-learning/topic/exponential.20backoff.20--.20with.20jitter/near/818761
Following from the discussion, connected improvements could include adjusting the random selection range, if this is an improvement.
Made a PR for do_api_query. But base and cap need to be decided. Also if this is done, then I can change class RandomExponentialBackoff accordingly.
See https://chat.zulip.org/#narrow/stream/92-learning/topic/exponential.20backoff.20--.20with.20jitter/near/820056.