semantic module name
parent
6a31c89f53
commit
626f70ac4b
|
@ -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()
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue