diff --git a/hammond-data/src/utils.rs b/hammond-data/src/utils.rs index d6c7cfd..fd0224b 100644 --- a/hammond-data/src/utils.rs +++ b/hammond-data/src/utils.rs @@ -84,8 +84,10 @@ pub fn delete_local_content(ep: &mut EpisodeCleanerQuery) -> Result<()> { /// Runs a cleaner for played Episode's that are pass the lifetime limit and /// scheduled for removal. pub fn checkup() -> Result<()> { + info!("Running database checks."); download_checker()?; played_cleaner()?; + info!("Checks completed."); Ok(()) } diff --git a/hammond-gtk/src/app.rs b/hammond-gtk/src/app.rs index 99415d9..29d634d 100644 --- a/hammond-gtk/src/app.rs +++ b/hammond-gtk/src/app.rs @@ -103,9 +103,9 @@ impl App { pub fn setup_timed_callbacks(&self) { let content = self.content.clone(); let header = self.header.clone(); - // Update 30 seconds after the Application is initialized. + // Update the feeds right after the Application is initialized. gtk::timeout_add_seconds( - 30, + 2, clone!(content => move || { utils::refresh_feed(content.clone(), header.clone(), None); glib::Continue(false) @@ -126,7 +126,7 @@ impl App { ); // Run a database checkup once the application is initialized. - gtk::idle_add(move || { + gtk::timeout_add(300, || { let _ = checkup(); glib::Continue(false) });