Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 4f079d8

Browse files
committed
[REVERT THIS] Hardwire testing the proxy agent into Complement temporarily
1 parent cd1579b commit 4f079d8

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

docker/conf-workers/shared.yaml.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ redis:
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 %}

docker/configure_workers_and_start.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
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):

0 commit comments

Comments
 (0)