-
Notifications
You must be signed in to change notification settings - Fork 55
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 ratelimit support #68
feat: add ratelimit support #68
Conversation
SendGrid::Response::Ratelimit instance for that specific response. Add appropriate docs.
@thinkingserious Getting back into Hacktoberfest and I can see that this slipped through the cracks from last time. I've merged latest master to it and touched up some style violations, looks like it's good to go! |
Encountering this issue as well, would really appreciate official support for the rate limiting behavior so as to mitigate the thundering herd problem which can currently happen. |
I'm starting to do some implementation with the Ruby gem and calling out to the SendGrid APIs (specifically subusers and white label) and would really appreciate this feature. Thank you so much for explaining what the X-RateLimit-Reset number is in your comment @awj
I was confused on what that number was supposed to represent. I did have one question @awj, why were you setting the '@reset' instance variable and then overwriting it in the next line: |
🤦♂ that doesn't need to be happening, and looks like some kind of editing oversight on my part. I'll get it touched up. |
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.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #68 +/- ##
=========================================
Coverage ? 95.49%
=========================================
Files ? 2
Lines ? 333
Branches ? 0
=========================================
Hits ? 318
Misses ? 15
Partials ? 0
Continue to review full report at Codecov.
|
Hello @awj, |
Fixes
Partial support for Rate limit handling as described in sendgrid/sendgrid-ruby#119. Adds functionality to assist users in handling rate limiting. Without more feedback on goals for any kind of in-client automatic rate limiting I'm not able to address that any further.
Checklist
Short description of what this PR does: