Ignore KeyBundle errors for a specified duration #67
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.
When fetching remote keys, KeyBundle will retry every time even if errors had recently occurred. This might not be desirable for many applications, as errors like this usually fix themselves within a short amount of time. Until then, additional requests would result in more load, latency, excess logging and key source spamming.
The PR adds an
ignore_errors_period
parameter to the KeyBundle object, that is used to specify the amount of time (in seconds) during which fetching is skipped. Default value is0
(zero), effectively disabling this functionality and resulting in retries every time the bundle is accessed. For most applications, a hold down timer of 60 seconds or more is probably reasonable.