Skip to content

Commit

Permalink
fix: too small refresh rate as a default
Browse files Browse the repository at this point in the history
  • Loading branch information
micielski committed Jul 4, 2024
1 parent 049ccdb commit eb953e5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rm-config/src/main_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ pub struct Connection {
pub username: Option<String>,
pub password: Option<String>,
pub url: Url,
#[serde(default)]
#[serde(default = "default_refresh")]
pub torrents_refresh: u64,
#[serde(default)]
#[serde(default = "default_refresh")]
pub stats_refresh: u64,
#[serde(default)]
#[serde(default = "default_refresh")]
pub free_space_refresh: u64,
}

fn default_refresh() -> u64 {
5
}

impl MainConfig {
pub(crate) const FILENAME: &'static str = "config.toml";
const DEFAULT_CONFIG: &'static str = include_str!("../defaults/config.toml");
Expand Down

0 comments on commit eb953e5

Please sign in to comment.