mirror of https://github.com/zulip/zulip.git
retention: Use logging API in a more standard way.
This commit is contained in:
parent
0d7cbc71dd
commit
341787a5e0
|
@ -269,7 +269,7 @@ def archive_messages_by_recipient(recipient: Recipient, message_retention_days:
|
||||||
realm, chunk_size)
|
realm, chunk_size)
|
||||||
|
|
||||||
def archive_personal_and_huddle_messages(realm: Realm, chunk_size: int=MESSAGE_BATCH_SIZE) -> None:
|
def archive_personal_and_huddle_messages(realm: Realm, chunk_size: int=MESSAGE_BATCH_SIZE) -> None:
|
||||||
logger.info("Archiving personal and huddle messages for realm " + realm.string_id)
|
logger.info("Archiving personal and huddle messages for realm %s", realm.string_id)
|
||||||
message_count = move_expired_personal_and_huddle_messages_to_archive(realm, chunk_size)
|
message_count = move_expired_personal_and_huddle_messages_to_archive(realm, chunk_size)
|
||||||
logger.info("Done. Archived %s messages", message_count)
|
logger.info("Done. Archived %s messages", message_count)
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ def archive_stream_messages(realm: Realm, chunk_size: int=MESSAGE_BATCH_SIZE) ->
|
||||||
if not streams:
|
if not streams:
|
||||||
return
|
return
|
||||||
|
|
||||||
logger.info("Archiving stream messages for realm " + realm.string_id)
|
logger.info("Archiving stream messages for realm %s", realm.string_id)
|
||||||
retention_policy_dict: Dict[int, int] = {}
|
retention_policy_dict: Dict[int, int] = {}
|
||||||
for stream in streams:
|
for stream in streams:
|
||||||
# if stream.message_retention_days is null, use the realm's policy
|
# if stream.message_retention_days is null, use the realm's policy
|
||||||
|
|
Loading…
Reference in New Issue