1
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2024-12-12 08:43:55 +02:00

Fix Jinja issue related to Synapse workers keepalive templating

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3114
This commit is contained in:
Slavi Pantaleev 2024-01-18 11:31:59 +02:00
parent ce883a5fce
commit 775000883a

View File

@ -12,7 +12,7 @@
{% macro render_worker_upstream(name, workers) %}
{% if workers | length > 0 %}
upstream {{ name }} {
keepalive {{ workers | length * 2 }};
keepalive {{ ((workers | length) * 2) | string }};
{% for worker in workers %}
server "{{ worker.name }}:{{ worker.port }}";
{% endfor %}
@ -42,7 +42,7 @@
# ensures that requests from the same client will always be passed
# to the same server (except when this server is unavailable)
hash $http_x_forwarded_for;
keepalive {{ generic_workers | length * 2 }};
keepalive {{ ((generic_workers | length) * 2) | string }};
{% for worker in generic_workers %}
server "{{ worker.name }}:{{ worker.port }}";