mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:06:05 -04:00
Wake up transaction queue when remote server comes back online (#6706)
This will be used to retry outbound transactions to a remote server if we think it might have come back up.
This commit is contained in:
parent
5ce0b17e38
commit
a8a50f5b57
11 changed files with 135 additions and 8 deletions
|
@ -387,6 +387,20 @@ class UserIpCommand(Command):
|
|||
)
|
||||
|
||||
|
||||
class RemoteServerUpCommand(Command):
|
||||
"""Sent when a worker has detected that a remote server is no longer
|
||||
"down" and retry timings should be reset.
|
||||
|
||||
If sent from a client the server will relay to all other workers.
|
||||
|
||||
Format::
|
||||
|
||||
REMOTE_SERVER_UP <server>
|
||||
"""
|
||||
|
||||
NAME = "REMOTE_SERVER_UP"
|
||||
|
||||
|
||||
_COMMANDS = (
|
||||
ServerCommand,
|
||||
RdataCommand,
|
||||
|
@ -401,6 +415,7 @@ _COMMANDS = (
|
|||
RemovePusherCommand,
|
||||
InvalidateCacheCommand,
|
||||
UserIpCommand,
|
||||
RemoteServerUpCommand,
|
||||
) # type: Tuple[Type[Command], ...]
|
||||
|
||||
# Map of command name to command type.
|
||||
|
@ -414,6 +429,7 @@ VALID_SERVER_COMMANDS = (
|
|||
ErrorCommand.NAME,
|
||||
PingCommand.NAME,
|
||||
SyncCommand.NAME,
|
||||
RemoteServerUpCommand.NAME,
|
||||
)
|
||||
|
||||
# The commands the client is allowed to send
|
||||
|
@ -427,4 +443,5 @@ VALID_CLIENT_COMMANDS = (
|
|||
InvalidateCacheCommand.NAME,
|
||||
UserIpCommand.NAME,
|
||||
ErrorCommand.NAME,
|
||||
RemoteServerUpCommand.NAME,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue