Change the auto-updater and checkup startup scheduling.
This commit is contained in:
parent
15b3eb115c
commit
2d71a99121
@ -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(())
|
||||
}
|
||||
|
||||
|
||||
@ -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)
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user