Overhaul core Tracker: extract torrents context (part 1)#1202
Merged
josecelano merged 11 commits intotorrust:developfrom Jan 23, 2025
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1202 +/- ##
===========================================
+ Coverage 77.61% 78.03% +0.42%
===========================================
Files 188 191 +3
Lines 12696 12999 +303
Branches 12696 12999 +303
===========================================
+ Hits 9854 10144 +290
- Misses 2678 2687 +9
- Partials 164 168 +4 ☔ View full report in Codecov by Sentry. |
Member
Author
|
ACK 612f729 |
josecelano
added a commit
that referenced
this pull request
Jan 24, 2025
046578d refactor: [#1203] use directly the InMemoryTorrentRepository (Jose Celano) 0f1b2fb refactor: [#1203] use InMemoryTorrentRepository directly in core tracker tests (Jose Celano) 2ac68f6 refactor: [#1203] move test (Jose Celano) 94673d6 refactor: [#1203] inline methods in core tracker (Jose Celano) Pull request description: This is part 2 of the refactor initiated [here](#1202). The core `Tracker` after this refactor: ```rust pub struct Tracker { /// The tracker configuration. config: Core, /// The service to check is a torrent is whitelisted. whitelist_authorization: Arc<whitelist::authorization::Authorization>, /// The in-memory torrents repository. in_memory_torrent_repository: Arc<InMemoryTorrentRepository>, /// The persistent torrents repository. db_torrent_repository: Arc<DatabasePersistentTorrentRepository>, } ``` ACKs for top commit: josecelano: ACK 046578d Tree-SHA512: db32af87815375ca570b81392c392dae0b602d12f54543c413d34f6a8dcb69f7e2f56a56e5d552a271d7fe2e4f751277d9f6e204caee297a2e3333f6a7b77e24
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overhaul core Tracker: extract torrents context.
The core Tracker is getting smaller and smaller. This PR reduces the dependencies to:
I will open a new PR (part 2) to continue extracting the rest of methods that are not used directly in a
announceorscraperequests.