Automatically remove orphan files
This commit is contained in:
@ -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?;
|
||||
|
Reference in New Issue
Block a user