-
Notifications
You must be signed in to change notification settings - Fork 20
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
[improvement] : Limit post calls to /v4/linode/instances endpoint #519
Conversation
3e1e914
to
c16e2c6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #519 +/- ##
==========================================
+ Coverage 65.24% 65.50% +0.25%
==========================================
Files 77 78 +1
Lines 4037 4090 +53
==========================================
+ Hits 2634 2679 +45
- Misses 1161 1167 +6
- Partials 242 244 +2 ☔ View full report in Codecov by Sentry. |
32797c8
to
57809a0
Compare
57809a0
to
a5cd414
Compare
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.
thanks for addressing the comments... lgtm!
What this PR does / why we need it:
This PR takes into account linode's 5 req/15 secs and 10 req/30 secs rate limits for POST to /v4/linode/instances endpoint.
We maintain count for number of requests made for each token and if we have used up all allowed requests, we'll wait until the limits reset. We rely on the response headers for counting how many more requests can be made and when the rate-limits will reset.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
TODOs: