JuliaWeb / JuliaWeb/Retry.jl

Backoff constant should be configurable

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
29
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Currently, if you use `@delay_retry` then the exponent is the constant `10`. This means 5 repeats go from `0.05` -> `0.5` -> `5` -> `50` -> `500`.

If for example, you have an API quota which has 60 second windows, you can't repeat 4 times as you would only cover 55.55 seconds. Instead, you need to go to the next one, which is over 8 minutes long. Being able to set a much smaller exponent would make this infinitely more useful. e.g. if 2 is used:

`0.05` -> `0.1` -> `0.2` -> `0.4` -> `0.8` -> `1.6` -> `3.2` -> `6.4` -> `12.8` -> `25.6` -> `51.2`

This way we only "waste" 42 seconds. Of course, every API and everyone's usage is different, so there many be many even better reasons to make this configurable.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.