-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add configurable update rate #116
Conversation
code-build.js
Outdated
@@ -87,16 +90,17 @@ async function waitForBuildEndTime( | |||
//We caught an error in trying to make the AWS api call, and are now checking to see if it was just a rate limiting error | |||
if (errObject.message && errObject.message.search("Rate exceeded") !== -1) { | |||
//We were rate-limited, so add `backOff` seconds to the wait time | |||
let newWait = wait + backOff; | |||
let newWait = updateInterval + updateBackOff; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a random jitter to this?
https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied Full Jitter to the added backoff now. If/when the backoff implementation looks good, I also need to update the backoff description in relevant places.
410dc4e
to
277b660
Compare
Issue #, if available: #76
Description of changes:
Default values are kept the same (30s interval, 15s back-off), so there should be no breakage when updating.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Check any applicable:
Supercedes #77 (which can be closed).