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