feat: file deletion implementation

This commit is contained in:
Paul Makles
2024-11-27 21:54:39 +00:00
parent acc4317246
commit 249749e14d
15 changed files with 267 additions and 18 deletions

View File

@@ -1,3 +1,19 @@
fn main() {
println!("Hello, world!");
use revolt_config::configure;
use revolt_database::DatabaseInfo;
use revolt_result::Result;
use tasks::{file_deletion, prune_dangling_files};
use tokio::try_join;
pub mod tasks;
#[tokio::main]
async fn main() -> Result<()> {
configure!(crond);
let db = DatabaseInfo::Auto.connect().await.expect("database");
try_join!(
file_deletion::task(db.clone()),
prune_dangling_files::task(db)
)
.map(|_| ())
}