From fc1c219fa85d440e23de03a201a08d32a7791e6f Mon Sep 17 00:00:00 2001 From: Joe Prosser Date: Tue, 23 Apr 2024 17:06:30 +0100 Subject: [PATCH] chore(commands): reduce batch size when bulk deleting comments --- CHANGELOG.md | 1 + cli/src/commands/delete.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 099e627e..9888b150 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased - Fixes issue when getting streams that have multiple filters on single user property - Fixes issue where upper case file names would not be matched in `parse` +- Reduce batch size when deleting comment batches # v0.24.0 - BREAKING: the `--context` option is now required. Users need to opt diff --git a/cli/src/commands/delete.rs b/cli/src/commands/delete.rs index b4b22665..8bd70f3c 100644 --- a/cli/src/commands/delete.rs +++ b/cli/src/commands/delete.rs @@ -200,7 +200,7 @@ fn delete_comments_in_period( }; // This is the maximum number of comments which the API permits deleting in a single call. - const DELETION_BATCH_SIZE: usize = 128; + const DELETION_BATCH_SIZE: usize = 32; // Buffer to store comment IDs to delete - allow it to be slightly larger than the deletion // batch size so that if there's an incomplete page it'll increase the counts. let mut comments_to_delete =