From 29402f0113f3e667affa2934d0a89e7452863a3a Mon Sep 17 00:00:00 2001 From: silverpill Date: Thu, 11 Aug 2022 23:13:07 +0000 Subject: [PATCH] Remove --dry-run parameter from delete-extraneous-posts command --- src/bin/mitractl.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/bin/mitractl.rs b/src/bin/mitractl.rs index 90a3f71..66fa313 100644 --- a/src/bin/mitractl.rs +++ b/src/bin/mitractl.rs @@ -115,9 +115,6 @@ struct DeletePost { #[derive(Parser)] struct DeleteExtraneousPosts { days: i64, - - #[clap(long)] - dry_run: bool, } /// Delete attachments that don't belong to any post @@ -249,10 +246,8 @@ async fn main() { let created_before = Utc::now() - Duration::days(subopts.days); let posts = find_extraneous_posts(db_client, &created_before).await.unwrap(); for post_id in posts { - if !subopts.dry_run { - let deletion_queue = delete_post(db_client, &post_id).await.unwrap(); - deletion_queue.process(&config).await; - }; + let deletion_queue = delete_post(db_client, &post_id).await.unwrap(); + deletion_queue.process(&config).await; println!("post {} deleted", post_id); }; },