Conversation
rr0gi
requested changes
Apr 8, 2022
| let log = Log.from "retry" | ||
|
|
||
| (** Clamped random exponential backoff for retry *) | ||
| let exp_backoff_pause ?max_delay attempt = |
Author
There was a problem hiding this comment.
it seems to always be used with this parameter specified in our codebase, I'm making it required.
| loop () | ||
|
|
||
| let wait_pause' ?ignore_should_exit = wait_pause'' ?ignore_should_exit id | ||
| let wait_pause ?ignore_should_exit master = wait_pause'' ?ignore_should_exit master#poll |
Contributor
There was a problem hiding this comment.
this doesn't belong to shared code..
| in | ||
| loop f 1 | ||
|
|
||
| let exp_backoff_blocking ~master ~exn ~name ?max_retries ~max_delay attempt = |
Contributor
There was a problem hiding this comment.
I think we should use this opportunity to introduce "retry policy record" to group all(?) these arguments together
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This code brings various implementation of exponential backoff used at ahrefs, I am looking to open-source them in order to be able to open-source some other component relying on it.