-
Notifications
You must be signed in to change notification settings - Fork 14
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: added setting to disable discord message on rate limit #232
Conversation
Reviewer's Guide by SourceryThis pull request introduces a new configuration setting that allows users to disable the Discord message that is sent when the Blizzard API rate limit is reached. This is implemented by adding a new boolean setting to the Sequence diagram for Blizzard Rate Limit with Discord Message TogglesequenceDiagram
participant OverfastClient
participant Settings
participant DiscordWebhook
OverfastClient->>Settings: Check discord_message_on_rate_limit
alt discord_message_on_rate_limit is true
OverfastClient->>DiscordWebhook: Send rate limit message
DiscordWebhook-->>OverfastClient: OK
else discord_message_on_rate_limit is false
OverfastClient-->>OverfastClient: Continue without sending message
end
OverfastClient-->>OverfastClient: Return Too Many Requests Response
Updated class diagram for SettingsclassDiagram
class Settings {
+sentry_dsn: str
+environment: str
+debug: bool
+fastapi_logs: bool
+uvicorn_logs: bool
+overfast_api_url: str
+openapi_route: str
+exception_handler: bool
+cors_origins: list[str]
+cors_allow_credentials: bool
+cors_allow_methods: list[str]
+cors_allow_headers: list[str]
+cache_enabled: bool
+cache_timeout: int
+cache_size: int
+blizzard_client_id: str
+blizzard_client_secret: str
+blizzard_api_url: str
+blizzard_oauth_url: str
+blizzard_rate_limit_requests: int
+blizzard_rate_limit_time_frame: int
+blizzard_rate_limit_retry_after: int
+discord_webhook_url: str
+github_repo_url: str
+contact_email: str
+discord_message_on_rate_limit: bool
}
note for Settings "Added discord_message_on_rate_limit attribute"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @TeKrop - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a comment to the config setting to explain when a user might want to disable the Discord message.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Summary by Sourcery
New Features: