From fb188778f518c9015d6e5481cf976f91bfb5b10e Mon Sep 17 00:00:00 2001 From: Mateusz Mandera Date: Fri, 20 Sep 2024 00:29:55 +0200 Subject: [PATCH] retention: Rename run_archiving_in_chunks to run_archiving. (cherry picked from commit ed7c330548bc9590212a3e1371b870521ce3f33c) --- zerver/lib/retention.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zerver/lib/retention.py b/zerver/lib/retention.py index eac16d969e..8749c67f62 100644 --- a/zerver/lib/retention.py +++ b/zerver/lib/retention.py @@ -120,7 +120,7 @@ def move_rows( return [] -def run_archiving_in_chunks( +def run_archiving( query: SQL, type: int, realm: Realm | None = None, @@ -206,7 +206,7 @@ def move_expired_messages_to_archive_by_recipient( ) check_date = timezone_now() - timedelta(days=message_retention_days) - return run_archiving_in_chunks( + return run_archiving( query, type=ArchiveTransaction.RETENTION_POLICY_BASED, realm=realm, @@ -244,7 +244,7 @@ def move_expired_direct_messages_to_archive( """ ) - message_count = run_archiving_in_chunks( + message_count = run_archiving( query, type=ArchiveTransaction.RETENTION_POLICY_BASED, realm=realm, @@ -470,7 +470,7 @@ def move_messages_to_archive( RETURNING id """ ) - count = run_archiving_in_chunks( + count = run_archiving( query, type=ArchiveTransaction.MANUAL, message_ids=Literal(tuple(message_ids)),