summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2017-11-24 00:38:44 +0000
committerRichard van der Hoff <richard@matrix.org>2018-06-22 15:58:15 +0100
commit1031bd25f8f37413f4101b0a049a598f1d95f8d3 (patch)
tree59031c3d2189efcfe80aaed77502dbb5e790d21e
parentDisable auth on room_members for now (diff)
downloadsynapse-1031bd25f8f37413f4101b0a049a598f1d95f8d3.tar.xz
Avoid doing presence updates on replication reconnect
Presence is supposed to be disabled on matrix.org, so we shouldn't send a load
of USER_SYNC commands every time the synchrotron reconnects to the master.
-rw-r--r--synapse/app/synchrotron.py2
-rw-r--r--synapse/handlers/presence.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/synapse/app/synchrotron.py b/synapse/app/synchrotron.py

index 3cade3c68e..67a2d2b7db 100644 --- a/synapse/app/synchrotron.py +++ b/synapse/app/synchrotron.py
@@ -214,6 +214,8 @@ class SynchrotronPresence(object): yield self.notify_from_replication(states, stream_id) def get_currently_syncing_users(self): + # presence is disabled on matrix.org, so we return the empty set + return set() return [ user_id for user_id, count in iteritems(self.user_to_num_current_syncs) if count > 0 diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index c7336020a2..95953efb08 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py
@@ -467,6 +467,7 @@ class PresenceHandler(object): Returns: set(str): A set of user_id strings. """ + # presence is disabled on matrix.org, so we return the empty set return set() syncing_user_ids = { user_id for user_id, count in self.user_to_num_current_syncs.items()