-
Notifications
You must be signed in to change notification settings - Fork 155
Better Retry and Provider Limit handling #912
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
base: main
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
57cb14e to
0a7e85c
Compare
|
Qodo is incorrect on these two points: Generic: Robust Error Handling and Edge Case Management - These values are guaranteed to be set. If not, the only handling will be by exception anyway, there is no recovery. Generic: Security-First Input Validation and Data Handling - The Retry-After is not actually unbounded, and the http-request timeout still applies even if there is a large value. Also, this is explicitly handled in the 429 Handler for TorBox and rethrows a RateLimitException, as it's expected. I have extensively tested the rate limiting with TorBox, it's handling well and this PR is ready to go. |
User description
PR Type
Enhancement, Bug fix
Description
Replace Polly HTTP retry policy with standard resilience handler
Implement Retry-After header support for respecting server delays
Remove unreachable ACTIVE_LIMIT error handling in TorBox client
Simplify retry logic with exponential backoff and jitter
Diagram Walkthrough
File Walkthrough
DiConfig.cs
Migrate to standard resilience handler with Retry-After supportserver/RdtClient.Service/DiConfig.cs
System.NetandPolly.Extensions.HttpimportsAddStandardResilienceHandlerTorBoxTorrentClient.cs
Remove unreachable ACTIVE_LIMIT error handlingserver/RdtClient.Service/Services/TorrentClients/TorBoxTorrentClient.cs
AddMagnetmethodAddFilemethod