diff --git a/type/__matrix_synapse/man.rst b/type/__matrix_synapse/man.rst index a951d24..4eb23bb 100644 --- a/type/__matrix_synapse/man.rst +++ b/type/__matrix_synapse/man.rst @@ -169,6 +169,10 @@ background-tasks-worker The worker that is used to run background tasks (e.g. cleaning up expired data). If not provided this defaults to the main process. +outbound-federation-worker + Worker to be used for sending federation requests. Can be specified multiple + times. Disables sending outbound federation requests from the master process. + registration-shared-secret If set, allows registration of standard or admin accounts by anyone who has the shared secret, even if registration is otherwise disabled. diff --git a/type/__matrix_synapse/manifest b/type/__matrix_synapse/manifest index 055fc81..4650a17 100755 --- a/type/__matrix_synapse/manifest +++ b/type/__matrix_synapse/manifest @@ -266,11 +266,19 @@ fi # Worker-mode configuration. export MAIN_LISTENER_PORT=8008 export ENABLE_MEDIA_REPO='true' -export SEND_FEDERATION_FROM_MAIN_PROCESS='true' +if [ -f "$__object/parameter/outbound-federation-worker" ]; then + FEDERATION_SENDER_INSTANCES=$(cat "$__object/parameter/outbound-federation-worker") + export FEDERATION_SENDER_INSTANCES +fi MAIN_LISTENER_RESOURCES="[federation,client]" if [ "$EXPOSE_METRICS" = "true" ]; then MAIN_LISTENER_RESOURCES="$(echo "$MAIN_LISTENER_RESOURCES" | tr -d ']'),metrics]" fi +if [ -n "$FEDERATION_SENDER_INSTANCES" ]; then + export SEND_FEDERATION_FROM_MAIN_PROCESS='false' +else + export SEND_FEDERATION_FROM_MAIN_PROCESS='true' +fi export MAIN_LISTENER_RESOURCES ENABLE_REPLICATION= diff --git a/type/__matrix_synapse/parameter/optional_multiple b/type/__matrix_synapse/parameter/optional_multiple index 8aa5c29..8871dd6 100644 --- a/type/__matrix_synapse/parameter/optional_multiple +++ b/type/__matrix_synapse/parameter/optional_multiple @@ -4,3 +4,4 @@ auto-join-room app-service-config-file extra-setting bind-address +outbound-federation-worker