diff --git a/src/console/commands/import_tracker_statistics.rs b/src/console/commands/import_tracker_statistics.rs index 39cc5a9f..de6825af 100644 --- a/src/console/commands/import_tracker_statistics.rs +++ b/src/console/commands/import_tracker_statistics.rs @@ -1,8 +1,26 @@ //! It imports statistics for all torrents from the linked tracker. //! -//! It imports the number of seeders and leechers for all torrent from the linked tracker. +//! It imports the number of seeders and leechers for all torrents from the +//! associated tracker. //! -//! You can execute it with: `cargo run --bin import_tracker_statistics` +//! You can execute it with: `cargo run --bin import_tracker_statistics`. +//! +//! After running it you will see the following output: +//! +//! ```text +//! Importing statistics from linked tracker ... +//! Loading configuration from config file `./config.toml` +//! Tracker url: udp://localhost:6969 +//! ``` +//! +//! Statistics are also imported: +//! +//! - Periodically by the importer job. The importer job is executed every hour +//! by default. See [`TrackerStatisticsImporter`](crate::config::TrackerStatisticsImporter) +//! for more details. +//! - When a new torrent is added. +//! - When the API returns data about a torrent statistics are collected from +//! the tracker in real time. use std::env; use std::sync::Arc; diff --git a/src/lib.rs b/src/lib.rs index 2f5a347d..a547a6b1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,6 +20,9 @@ //! - [Development](#development) //! - [Configuration](#configuration) //! - [Usage](#usage) +//! - [API](#api) +//! - [Tracker Statistics Importer](#tracker-statistics-importer) +//! - [Upgrader](#upgrader) //! - [Contributing](#contributing) //! - [Documentation](#documentation) //! @@ -218,12 +221,24 @@ //! //! # Usage //! +//! ## API +//! //! Running the tracker with the default configuration will expose the REST API on port 3000: //! -//! You can also run console commands: +//! ## Tracker Statistics Importer +//! +//! This console command allows you to manually import the tracker statistics. +//! +//! For more information about this command you can visit the documentation for +//! the [`Import tracker statistics`](crate::console::commands::import_tracker_statistics) module. +//! +//! ## Upgrader +//! +//! This console command allows you to manually upgrade the application from one +//! version to another. //! -//! - [`Import tracker statistics`](crate::console::commands::import_tracker_statistics). -//! - [`Upgrade app from version 1.0.0 to 2.0.0`](crate::upgrades::from_v1_0_0_to_v2_0_0::upgrader). +//! For more information about this command you can visit the documentation for +//! the [`Upgrade app from version 1.0.0 to 2.0.0`](crate::upgrades::from_v1_0_0_to_v2_0_0::upgrader) module. //! //! Refer to the documentation of each command for more information. //!