diff --git a/client/src/announcer/mod.rs b/client/src/announcer/mod.rs index a087925..30604a6 100644 --- a/client/src/announcer/mod.rs +++ b/client/src/announcer/mod.rs @@ -74,7 +74,9 @@ pub struct Announcer { impl Announcer { pub async fn new(settings: AnnouncerSettings, client: Client) -> crate::Result { let schedule = self::utils::get_sorted_schedule(&client).await?; - let schedule_update_interval = tokio::time::interval(settings.schedule_refresh); + + let mut schedule_update_interval = tokio::time::interval(settings.schedule_refresh); + schedule_update_interval.reset(); Ok(Self { settings, @@ -124,7 +126,7 @@ impl Announcer { return Ok(AnnouncerPollResult::ScheduleRefreshed(changes)) }, Err(e) => { - warn!("Failed to update schedule {e}") + warn!("Failed to update schedule: {e}") }, } }