File tree Expand file tree Collapse file tree 15 files changed +15
-14
lines changed
axum-http-tracker-server/src/v1/handlers
udp-tracker-server/src/handlers Expand file tree Collapse file tree 15 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,8 @@ mod tests {
119119 use bittorrent_tracker_core:: authentication:: key:: repository:: in_memory:: InMemoryKeyRepository ;
120120 use bittorrent_tracker_core:: authentication:: service:: AuthenticationService ;
121121 use bittorrent_tracker_core:: databases:: setup:: initialize_database;
122+ use bittorrent_tracker_core:: statistics:: persisted:: downloads:: DatabaseDownloadsMetricRepository ;
122123 use bittorrent_tracker_core:: torrent:: repository:: in_memory:: InMemoryTorrentRepository ;
123- use bittorrent_tracker_core:: torrent:: repository:: downloads:: DatabaseDownloadsMetricRepository ;
124124 use bittorrent_tracker_core:: whitelist:: authorization:: WhitelistAuthorization ;
125125 use bittorrent_tracker_core:: whitelist:: repository:: in_memory:: InMemoryWhitelist ;
126126 use torrust_tracker_configuration:: Configuration ;
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ use bittorrent_tracker_core::announce_handler::AnnounceHandler;
1414use bittorrent_tracker_core:: authentication:: key:: repository:: in_memory:: InMemoryKeyRepository ;
1515use bittorrent_tracker_core:: authentication:: service:: AuthenticationService ;
1616use bittorrent_tracker_core:: databases:: setup:: initialize_database;
17+ use bittorrent_tracker_core:: statistics:: persisted:: downloads:: DatabaseDownloadsMetricRepository ;
1718use bittorrent_tracker_core:: torrent:: repository:: in_memory:: InMemoryTorrentRepository ;
18- use bittorrent_tracker_core:: torrent:: repository:: downloads:: DatabaseDownloadsMetricRepository ;
1919use bittorrent_tracker_core:: whitelist:: authorization:: WhitelistAuthorization ;
2020use bittorrent_tracker_core:: whitelist:: repository:: in_memory:: InMemoryWhitelist ;
2121use futures:: future:: BoxFuture ;
Original file line number Diff line number Diff line change @@ -212,8 +212,8 @@ mod tests {
212212 use bittorrent_tracker_core:: authentication:: key:: repository:: in_memory:: InMemoryKeyRepository ;
213213 use bittorrent_tracker_core:: authentication:: service:: AuthenticationService ;
214214 use bittorrent_tracker_core:: databases:: setup:: initialize_database;
215+ use bittorrent_tracker_core:: statistics:: persisted:: downloads:: DatabaseDownloadsMetricRepository ;
215216 use bittorrent_tracker_core:: torrent:: repository:: in_memory:: InMemoryTorrentRepository ;
216- use bittorrent_tracker_core:: torrent:: repository:: downloads:: DatabaseDownloadsMetricRepository ;
217217 use bittorrent_tracker_core:: whitelist:: authorization:: WhitelistAuthorization ;
218218 use bittorrent_tracker_core:: whitelist:: repository:: in_memory:: InMemoryWhitelist ;
219219 use torrust_tracker_configuration:: { Configuration , Core } ;
Original file line number Diff line number Diff line change @@ -176,8 +176,8 @@ mod tests {
176176 use bittorrent_tracker_core:: authentication:: service:: AuthenticationService ;
177177 use bittorrent_tracker_core:: databases:: setup:: initialize_database;
178178 use bittorrent_tracker_core:: scrape_handler:: ScrapeHandler ;
179+ use bittorrent_tracker_core:: statistics:: persisted:: downloads:: DatabaseDownloadsMetricRepository ;
179180 use bittorrent_tracker_core:: torrent:: repository:: in_memory:: InMemoryTorrentRepository ;
180- use bittorrent_tracker_core:: torrent:: repository:: downloads:: DatabaseDownloadsMetricRepository ;
181181 use bittorrent_tracker_core:: whitelist:: authorization:: WhitelistAuthorization ;
182182 use bittorrent_tracker_core:: whitelist:: repository:: in_memory:: InMemoryWhitelist ;
183183 use futures:: future:: BoxFuture ;
Original file line number Diff line number Diff line change @@ -99,8 +99,8 @@ use torrust_tracker_primitives::core::AnnounceData;
9999use torrust_tracker_primitives:: peer;
100100
101101use super :: torrent:: repository:: in_memory:: InMemoryTorrentRepository ;
102- use super :: torrent:: repository:: downloads:: DatabaseDownloadsMetricRepository ;
103102use crate :: error:: AnnounceError ;
103+ use crate :: statistics:: persisted:: downloads:: DatabaseDownloadsMetricRepository ;
104104use crate :: whitelist:: authorization:: WhitelistAuthorization ;
105105
106106/// Handles `announce` requests from `BitTorrent` clients.
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ use crate::authentication::service::AuthenticationService;
1111use crate :: databases:: setup:: initialize_database;
1212use crate :: databases:: Database ;
1313use crate :: scrape_handler:: ScrapeHandler ;
14+ use crate :: statistics:: persisted:: downloads:: DatabaseDownloadsMetricRepository ;
1415use crate :: torrent:: manager:: TorrentsManager ;
1516use crate :: torrent:: repository:: in_memory:: InMemoryTorrentRepository ;
16- use crate :: torrent:: repository:: downloads:: DatabaseDownloadsMetricRepository ;
1717use crate :: whitelist:: authorization:: WhitelistAuthorization ;
1818use crate :: whitelist:: manager:: WhitelistManager ;
1919use crate :: whitelist:: repository:: in_memory:: InMemoryWhitelist ;
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ use torrust_tracker_metrics::metric_name;
55use torrust_tracker_primitives:: DurationSinceUnixEpoch ;
66use torrust_tracker_torrent_repository:: event:: Event ;
77
8+ use crate :: statistics:: persisted:: downloads:: DatabaseDownloadsMetricRepository ;
89use crate :: statistics:: repository:: Repository ;
910use crate :: statistics:: TRACKER_CORE_PERSISTENT_TORRENTS_DOWNLOADS_TOTAL ;
10- use crate :: torrent:: repository:: downloads:: DatabaseDownloadsMetricRepository ;
1111
1212pub async fn handle_event (
1313 event : Event ,
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ use torrust_tracker_events::receiver::RecvError;
66use torrust_tracker_torrent_repository:: event:: receiver:: Receiver ;
77
88use super :: handler:: handle_event;
9+ use crate :: statistics:: persisted:: downloads:: DatabaseDownloadsMetricRepository ;
910use crate :: statistics:: repository:: Repository ;
10- use crate :: torrent:: repository:: downloads:: DatabaseDownloadsMetricRepository ;
1111use crate :: { CurrentClock , TRACKER_CORE_LOG_TARGET } ;
1212
1313#[ must_use]
File renamed without changes.
Original file line number Diff line number Diff line change 1+ pub mod downloads;
2+
13use std:: sync:: Arc ;
24
35use thiserror:: Error ;
@@ -8,7 +10,7 @@ use torrust_tracker_primitives::DurationSinceUnixEpoch;
810use super :: repository:: Repository ;
911use super :: TRACKER_CORE_PERSISTENT_TORRENTS_DOWNLOADS_TOTAL ;
1012use crate :: databases;
11- use crate :: torrent :: repository :: downloads:: DatabaseDownloadsMetricRepository ;
13+ use crate :: statistics :: persisted :: downloads:: DatabaseDownloadsMetricRepository ;
1214
1315/// Loads persisted metrics from the database and sets them in the stats repository.
1416///
You can’t perform that action at this time.
0 commit comments