mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 12:04:53 -04:00
Add instance name to RDATA/POSITION commands (#7364)
This is primarily for allowing us to send those commands from workers, but for now simply allows us to ignore echoed RDATA/POSITION commands that we sent (we get echoes of sent commands when using redis). Currently we log a WARNING on the master process every time we receive an echoed RDATA.
This commit is contained in:
parent
3eab76ad43
commit
37f6823f5b
10 changed files with 95 additions and 50 deletions
|
@ -234,7 +234,8 @@ class HomeServer(object):
|
|||
self._listening_services = []
|
||||
self.start_time = None
|
||||
|
||||
self.instance_id = random_string(5)
|
||||
self._instance_id = random_string(5)
|
||||
self._instance_name = config.worker_name or "master"
|
||||
|
||||
self.clock = Clock(reactor)
|
||||
self.distributor = Distributor()
|
||||
|
@ -254,7 +255,15 @@ class HomeServer(object):
|
|||
This is used to distinguish running instances in worker-based
|
||||
deployments.
|
||||
"""
|
||||
return self.instance_id
|
||||
return self._instance_id
|
||||
|
||||
def get_instance_name(self) -> str:
|
||||
"""A unique name for this synapse process.
|
||||
|
||||
Used to identify the process over replication and in config. Does not
|
||||
change over restarts.
|
||||
"""
|
||||
return self._instance_name
|
||||
|
||||
def setup(self):
|
||||
logger.info("Setting up.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue