diff options
author | Erik Johnston <erik@matrix.org> | 2024-07-11 16:44:15 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2024-07-11 16:44:15 +0100 |
commit | 33e0ff2f8ca8cdb61e62e5eee1b713c5bad6bbc4 (patch) | |
tree | 6469697fbad39d59ffb7e6fbc74c451b46d131fa | |
parent | Merge branch 'erikj/ss_sort' into erikj/ss_hacks (diff) | |
download | synapse-33e0ff2f8ca8cdb61e62e5eee1b713c5bad6bbc4.tar.xz |
Reduce log spam
-rw-r--r-- | synapse/handlers/sliding_sync.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py index 7ca88b86ee..90128fa7f5 100644 --- a/synapse/handlers/sliding_sync.py +++ b/synapse/handlers/sliding_sync.py @@ -24,12 +24,7 @@ from typing import TYPE_CHECKING, Any, Dict, Final, List, Optional, Set, Tuple import attr from immutabledict import immutabledict -from synapse.api.constants import ( - AccountDataTypes, - Direction, - EventTypes, - Membership, -) +from synapse.api.constants import AccountDataTypes, Direction, EventTypes, Membership from synapse.events import EventBase from synapse.events.utils import strip_event from synapse.handlers.relations import BundledAggregations @@ -1571,12 +1566,13 @@ class SlidingSyncHandler: up_to_stream_id=since_stream_id, ) - logger.debug( - "Deleted %d to-device messages up to %d for %s", - deleted, - since_stream_id, - user_id, - ) + if deleted: + logger.debug( + "Deleted %d to-device messages up to %d for %s", + deleted, + since_stream_id, + user_id, + ) messages, stream_id = await self.store.get_messages_for_device( user_id=user_id, |