-
Notifications
You must be signed in to change notification settings - Fork 12
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
rework wikidata and mb delays #1122
Conversation
Reviewer's Guide by SourceryThis pull request reworks the Wikidata and MusicBrainz delays to improve performance and logging. Sequence diagram for updated API retry and timeout behaviorsequenceDiagram
participant App
participant MB as MusicBrainz API
participant WD as Wikidata API
Note over App,WD: Updated timeout and retry configuration
App->>MB: API Request
alt Success
MB-->>App: Response (within 15s)
else Timeout
MB--xApp: Timeout (after 15s)
Note over App: Retry up to 2 times
App->>MB: Retry Request
end
App->>WD: Wikidata Request
alt Success
WD-->>App: Response (within 5s)
else Timeout
WD--xApp: Timeout (after 5s)
Note over App: Fallback to English if configured
App->>WD: Request English data
end
Class diagram showing configuration changesclassDiagram
class MusicBrainzHelper {
+config
+__init__(config)
}
note for MusicBrainzHelper "Changed log level to INFO"
class WikimediaHelper {
+config
-_get_page(entity, lang)
-_check_missing(metadata)
}
note for WikimediaHelper "Added 5s timeout for requests"
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.
We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1122 +/- ##
=======================================
Coverage 62.44% 62.44%
=======================================
Files 44 44
Lines 7338 7338
=======================================
Hits 4582 4582
Misses 2756 2756
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Reduce MusicBrainz timeouts and increase retries. Reduce Wikipedia timeouts and add logging.
Enhancements: