diff --git a/tegakituesday/src/main.rs b/tegakituesday/src/main.rs index b5fb184..2d134ba 100644 --- a/tegakituesday/src/main.rs +++ b/tegakituesday/src/main.rs @@ -65,10 +65,10 @@ async fn main() { tokio::task::spawn(async { let mut interval = time::interval(Duration::from_millis(60 * 60 * 1000)); // every hour loop { + interval.tick().await; if let Err(err) = DATABASE.refresh_users(&HTTP).await { error!("{:?}", err); } - interval.tick().await; } }); rocket().await.expect("Failed to launch rocket");