Automatically remove orphan files

This commit is contained in:
2025-04-09 21:51:23 +02:00
parent 6f18aafc33
commit 7c04acaf4b
5 changed files with 15 additions and 5 deletions

View File

@ -1,5 +1,5 @@
use crate::app_config::AppConfig;
use crate::services::tokens_service;
use crate::services::{files_service, tokens_service};
use std::time::Duration;
/// The "cron" of the project
@ -20,7 +20,8 @@ pub async fn main_routine() {
}
async fn exec_routine() -> anyhow::Result<()> {
// TODO : remove orphan attachment
// Remove orphan attachments
files_service::run_garbage_collector().await?;
// Remove expired tokens
tokens_service::cleanup().await?;