Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

retention: Rename run_archiving_in_chunks to run_archiving.

Mateusz Manderaed7c330548bc
diff --git a/zerver/lib/retention.py b/zerver/lib/retention.py
index eac16d969e8..8749c67f624 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)),