This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 99 {% if using_unix_sockets %}
1010 path: /tmp/redis.sock
1111 {% endif %}
12+
13+ outbound_federation_restricted_to:
14+ - federation_sender1
1215{% endif %}
1316
1417{% if appservice_registrations is not none %}
Original file line number Diff line number Diff line change 136136 },
137137 "federation_sender" : {
138138 "app" : "synapse.app.generic_worker" ,
139- "listener_resources" : [],
139+ "listener_resources" : ["replication" ],
140140 "endpoint_patterns" : [],
141141 "shared_extra_conf" : {},
142142 "worker_extra_conf" : "" ,
@@ -409,16 +409,6 @@ def add_worker_roles_to_shared_config(
409409 worker_name
410410 )
411411
412- # Map of stream writer instance names to host/ports combos
413- if os .environ .get ("SYNAPSE_USE_UNIX_SOCKET" , False ):
414- instance_map [worker_name ] = {
415- "path" : f"/run/worker.{ worker_port } " ,
416- }
417- else :
418- instance_map [worker_name ] = {
419- "host" : "localhost" ,
420- "port" : worker_port ,
421- }
422412 # Update the list of stream writers. It's convenient that the name of the worker
423413 # type is the same as the stream to write. Iterate over the whole list in case there
424414 # is more than one.
@@ -428,6 +418,8 @@ def add_worker_roles_to_shared_config(
428418 worker , []
429419 ).append (worker_name )
430420
421+ # Force adding a replication listener if a worker type is defined as having one
422+ if "replication" in WORKERS_CONFIG [worker ].get ("listener_resources" , []):
431423 # Map of stream writer instance names to host/ports combos
432424 # For now, all stream writers need http replication ports
433425 if os .environ .get ("SYNAPSE_USE_UNIX_SOCKET" , False ):
You can’t perform that action at this time.
0 commit comments