1
0
Fork 0

semantic module name

Zynh Ludwig 2024-08-28 19:19:15 -07:00
parent 6a31c89f53
commit 626f70ac4b
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ async fn main() -> io::Result<()> {
let state = cache::fetch_cache().await; let state = cache::fetch_cache().await;
sweeper::spawn_sweeper(state.clone()); sweeper::spawn(state.clone());
// Router Setup // Router Setup
let app = Router::new() let app = Router::new()

View File

@ -3,7 +3,7 @@ use std::time::Duration;
use crate::state::{AppState, AsyncRemoveRecord}; use crate::state::{AppState, AsyncRemoveRecord};
/// Spawn a repeating task that will clean files periodically /// Spawn a repeating task that will clean files periodically
pub fn spawn_sweeper(state: AppState) { pub fn spawn(state: AppState) {
tokio::spawn(async move { tokio::spawn(async move {
loop { loop {
tokio::time::sleep(Duration::from_secs(15 * 60)).await; tokio::time::sleep(Duration::from_secs(15 * 60)).await;