mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 15:38:47 -05:00
Stub out ServerNoticesSender on the workers
... and have the sync endpoints call it directly rather than obsure indirection via PresenceHandler
This commit is contained in:
parent
d5dca9a04f
commit
8810685df9
6 changed files with 66 additions and 8 deletions
|
|
@ -31,9 +31,6 @@ class ServerNoticesSender(object):
|
|||
def on_user_syncing(self, user_id):
|
||||
"""Called when the user performs a sync operation.
|
||||
|
||||
This is only called when /sync (or /events) is called on the synapse
|
||||
master. In a deployment with synchrotrons, on_user_ip is called
|
||||
|
||||
Args:
|
||||
user_id (str): mxid of user who synced
|
||||
|
||||
|
|
@ -45,7 +42,7 @@ class ServerNoticesSender(object):
|
|||
)
|
||||
|
||||
def on_user_ip(self, user_id):
|
||||
"""Called when a worker process saw a client request.
|
||||
"""Called on the master when a worker process saw a client request.
|
||||
|
||||
Args:
|
||||
user_id (str): mxid
|
||||
|
|
@ -53,6 +50,9 @@ class ServerNoticesSender(object):
|
|||
Returns:
|
||||
Deferred
|
||||
"""
|
||||
# The synchrotrons use a stubbed version of ServerNoticesSender, so
|
||||
# we check for notices to send to the user in on_user_ip as well as
|
||||
# in on_user_syncing
|
||||
return self._consent_server_notices.maybe_send_server_notice_to_user(
|
||||
user_id,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue