From 064b6bb2adca5fdffa37de06c0114983542feab2 Mon Sep 17 00:00:00 2001 From: Johanna Dorothea Reichmann Date: Fri, 15 Apr 2022 15:43:56 +0200 Subject: [PATCH] feat(synapse): allow using multiple federation workers --- .../templates/synapse/homeserver.yaml.j2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 index ae71b7aec..31102ce31 100644 --- a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -2849,16 +2849,16 @@ send_federation: {{ matrix_synapse_send_federation | to_json }} # started, to ensure that all instances are running with the same config (otherwise # events may be dropped). # -#federation_sender_instances: -# - federation_sender1 -{% if matrix_synapse_federation_sender_instances | length > 0 %} -federation_sender_instances: {{ matrix_synapse_federation_sender_instances | to_json }} -{% endif %} - {% if matrix_synapse_federation_pusher_instances | length > 0 %} pusher_instances: {{ matrix_synapse_federation_pusher_instances | to_json }} {% endif %} start_pushers: {{ matrix_synapse_start_pushers | to_json }} +{% if matrix_synapse_workers_federation_sender_workers_count != 0%} +federation_sender_instances: +{% for i in range(0, matrix_synapse_workers_federation_sender_workers_count|int)|list %} + - federation_sender:{{ i | int }} +{% endfor %} +{% endif %} # When using workers this should be a map from `worker_name` to the # HTTP replication listener of the worker, if configured.