From 51674887ffa1dd07d678d861159b3c9859537fe1 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 8 Nov 2022 17:39:56 +0200 Subject: [PATCH] Fix Synapse pusher_instances not being populated correctly This caused push notifications to be delivered more than once if multiple `pusher` workers were enabled. --- .../tasks/synapse/workers/util/inject_worker.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/custom/matrix-synapse/tasks/synapse/workers/util/inject_worker.yml b/roles/custom/matrix-synapse/tasks/synapse/workers/util/inject_worker.yml index b69529b9..4542f19c 100644 --- a/roles/custom/matrix-synapse/tasks/synapse/workers/util/inject_worker.yml +++ b/roles/custom/matrix-synapse/tasks/synapse/workers/util/inject_worker.yml @@ -63,3 +63,8 @@ - ansible.builtin.set_fact: matrix_synapse_instance_map: "{{ matrix_synapse_instance_map | combine({matrix_synapse_worker_details.name: {'host': matrix_synapse_worker_details.name, 'port': matrix_synapse_worker_details.replication_port}}) }}" when: matrix_synapse_worker_details.type in matrix_synapse_known_instance_map_eligible_worker_types + +# Inject pusher instances. +- ansible.builtin.set_fact: + matrix_synapse_federation_pusher_instances: "{{ matrix_synapse_federation_pusher_instances + [matrix_synapse_worker_details.name] }}" + when: matrix_synapse_worker_details.type == 'pusher'