diff options
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/config/workers.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/config/workers.py b/synapse/config/workers.py index c80c338584..a4cd4d3066 100644 --- a/synapse/config/workers.py +++ b/synapse/config/workers.py @@ -27,6 +27,17 @@ class InstanceLocationConfig: port = attr.ib(type=int) +@attr.s +class WriterLocations: + """Specifies the instances that write various streams. + + Attributes: + events: The instance that writes to the event and backfill streams. + """ + + events = attr.ib(default="master", type=str) + + class WorkerConfig(Config): """The workers are processes run separately to the main synapse process. They have their own pid_file and listener configuration. They use the @@ -88,6 +99,10 @@ class WorkerConfig(Config): name: InstanceLocationConfig(**c) for name, c in instance_map.items() } + # Map from type of streams to source, c.f. WriterLocations. + writers = config.get("writers", {}) or {} + self.writers = WriterLocations(**writers) + def read_arguments(self, args): # We support a bunch of command line arguments that override options in # the config. A lot of these options have a worker_* prefix when running |