matrix-synapse: Fix ternary with --set

This commit is contained in:
Alexander Olofsson 2021-03-20 20:44:38 +01:00
parent 6cbb8bf9fd
commit c13ac3d9a4
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ data:
{{- $name := $worker | replace "_" "-" }}
{{ $name }}.worker: |
worker_app: "synapse.app.{{ $config.generic | ternary "generic_worker" $worker }}"
worker_app: "synapse.app.{{ (not (not $config.generic)) | ternary "generic_worker" $worker }}"
{{- if $config.name -}}
{{- if (ne $config.replicaCount 1) -}}
{{- fail "Replica count must be 1 if a worker has a unique name." -}}

View file

@ -63,7 +63,7 @@ spec:
-e "s/@@REDIS_PASSWORD@@/${REDIS_PASSWORD:-}/" \
> /synapse/config/conf.d/secrets.yaml
exec python -B -m synapse.app.{{ $config.generic | ternary "generic_worker" $worker }} \
exec python -B -m synapse.app.{{ (not (not $config.generic)) | ternary "generic_worker" $worker }} \
-c /synapse/config/homeserver.yaml \
-c /synapse/config/conf.d/ \
-c /synapse/config/{{ $name }}.worker