-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/Proactive Rate Limitting in Github Client #75
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
Merged
isSerge
merged 25 commits into
isSerge:main
from
riturajFi:feature/rate-limiting-github
Jul 24, 2025
Merged
Changes from 13 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
525da2f
implemented a rate limitter
3c275fc
adding threshold to config
a436850
fixing the update rate limit
3f1c76e
minor change
82bc48e
dropping locka guard and reading the states only
riturajFi 591086c
minor commit
riturajFi e049d6c
added jitter
riturajFi befb1e0
fixed the jitter issue
riturajFi 0184f8f
fixed error handling for headers
riturajFi 5ded0b9
refactor: removed commented function for cleanup
riturajFi 39fda41
docs: update installation instructions to include prerequisites and d…
isSerge bbd3fe3
fix:removed double call to update_rate_limit
riturajFi 2656e1b
refactor:fixed formatting and changed some field names
riturajFi 0f7641d
template for testing the rate limit funciton
riturajFi ca5bca8
test:adding test for rate_limmitting
riturajFi 8db7442
minor change
riturajFi fcef886
jitter tests
riturajFi bcbde33
Merge remote-tracking branch 'origin/main' into feature/rate-limiting…
riturajFi 263b9e8
Merge branch 'main' into feature/rate-limiting-github
riturajFi e507c24
fix: add threshold as an input parameter
riturajFi fd4fd16
fix: better error handling message for failing to parse header
riturajFi 92a2f91
chore: formating
riturajFi e6876cf
chore: add docs for functions
riturajFi 9f97b3a
fix: cargo fmt
riturajFi b1513c7
chore: add docs to field
riturajFi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
isSerge marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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
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
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
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -195,6 +195,9 @@ impl GithubPoller { | |||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||
| return Err(PollerError::Github(github_error)); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| GithubError::HeaderError(_) => { | ||||||||||||||||||||||||||
| tracing::error!("Header error while polling issues for repository"); | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| GithubError::HeaderError(_) => { | |
| tracing::error!("Header error while polling issues for repository"); | |
| } | |
| GithubError::HeaderError(msg) => { | |
| tracing::warn!( | |
| "Could not parse rate limit headers for repo {} (chat {}): {}. \ | |
| Skipping this repo for this cycle.", | |
| repo.name_with_owner, | |
| chat_id, | |
| msg | |
| ); | |
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.