-
Notifications
You must be signed in to change notification settings - Fork 46
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
Overhaul core Tracker: extract torrents context (part 1) #1201
Labels
Code Cleanup / Refactoring
Tidying and Making Neat
Comments
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Jan 23, 2025
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Jan 23, 2025
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Jan 23, 2025
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Jan 23, 2025
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Jan 23, 2025
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Jan 23, 2025
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Jan 23, 2025
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Jan 23, 2025
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Jan 23, 2025
Grouping similar methods.
josecelano
added a commit
to josecelano/torrust-tracker
that referenced
this issue
Jan 23, 2025
josecelano
added a commit
that referenced
this issue
Jan 23, 2025
612f729 refactor: [#1201] remove tracker dependency on TorrentsManager (Jose Celano) 3a2e8f0 refactor: [#1201] reorganize methods in tracker (Jose Celano) b3fcdb4 refactor: [#1201] remove direct dependency on database from tracker (Jose Celano) bdc3f22 refactor: [#1201] add database to app container y environments (Jose Celano) a4a2d67 refactor: [#1201] remove pub fn from tracker (Jose Celano) 6fb632e refactor: [#1201] remove duplicate code (Jose Celano) 4e3dbae refactor: [#1201] inject new extracted sercvies in core tracker (Jose Celano) 6332261 refactor: [#1201] extract TorrentsManager (Jose Celano) f4dcb51 refactor: [#1201] rename tracker field (Jose Celano) 9b5f776 refactor: [#1201] exatrct DatabasePersistentTorrentRepository (Jose Celano) 03ef7f6 refactor: [1201] extract InMemoryTorrentRepository (Jose Celano) Pull request description: Overhaul core Tracker: extract torrents context. This PR is part of the implementation of the issue: #1201. The core Tracker is getting smaller and smaller. This PR reduces the dependencies to: ```rust pub struct Tracker { /// The tracker configuration. config: Core, /// The service to check is a torrent is whitelisted. pub 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>, } ``` I will open a new PR (part 2) to continue extracting the rest of methods that are not used directly in a `announce` or `scrape` requests. ACKs for top commit: josecelano: ACK 612f729 Tree-SHA512: 3ac17b515e9c521c128cd3694724d9f5294a1ea8a0b123959953d48d20556efec1de8e105c297bf1e75d1164b91fe4805c970a223572edc8ece9de2d020ce7d6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Parent issue: #1181
Remove field
torrents
fromcore::Tracker
extracting new services for each responsibility:InMemoryTorrentRepository
: all the info about torrents in memory.DatabasePersistentTorrentRepository
: the torrent's data that is persisted (only number of downloads)TorrentsManager
: other tasks like load torrents' data from database, ...The text was updated successfully, but these errors were encountered: