From 0040dcf6df169202bf6f26f5c5665168d931b5e6 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Fri, 28 Mar 2025 13:43:36 -0700 Subject: [PATCH] Wait before refreshing users not after --- tegakituesday/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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");