Clean up orphan images

This commit is contained in:
jude committed 2026-10-12 21:39:34 +01:00
1 parent 8763a8e74a
commit c3bb015d2f
11 files changed
+496 -2

No files matched your search

+2
View File
@@ -9,6 +9,7 @@ mod consts;
mod event_handlers;
#[cfg(not(test))]
mod hooks;
mod image_cleanup;
mod interval_parser;
mod metrics;
#[cfg(not(test))]
@@ -121,6 +122,7 @@ async fn _main(tx: Sender<()>) -> Result<(), Box<dyn StdError + Send + Sync>> {
Pool::connect(&env::var("DATABASE_URL").expect("No database URL provided")).await.unwrap();
match cmd_word {
Some("clean-images") => image_cleanup::run(&database).await,
Some("clean") => {
let sent_clean_age = env::var("SENT_CLEAN_AGE").expect("No SENT_CLEAN_AGE provided");
if sent_clean_age.is_empty() {