From 626f70ac4b86c34f841147d0ec566b20c08acde3 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Wed, 28 Aug 2024 19:19:15 -0700 Subject: [PATCH] semantic module name --- src/main.rs | 2 +- src/sweeper.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index e7cf361..fbcf171 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,7 +49,7 @@ async fn main() -> io::Result<()> { let state = cache::fetch_cache().await; - sweeper::spawn_sweeper(state.clone()); + sweeper::spawn(state.clone()); // Router Setup let app = Router::new() diff --git a/src/sweeper.rs b/src/sweeper.rs index b803803..bc48184 100644 --- a/src/sweeper.rs +++ b/src/sweeper.rs @@ -3,7 +3,7 @@ use std::time::Duration; use crate::state::{AppState, AsyncRemoveRecord}; /// Spawn a repeating task that will clean files periodically -pub fn spawn_sweeper(state: AppState) { +pub fn spawn(state: AppState) { tokio::spawn(async move { loop { tokio::time::sleep(Duration::from_secs(15 * 60)).await;