[__matrix_synapse] add outbound-federation-worker parameter

This commit is contained in:
fnux 2021-02-24 19:31:48 +01:00
parent e10ae4d0a7
commit 3263c5dddd
No known key found for this signature in database
GPG key ID: 4502C902C00A1E12
3 changed files with 14 additions and 1 deletions

View file

@ -169,6 +169,10 @@ background-tasks-worker
The worker that is used to run background tasks (e.g. cleaning up expired The worker that is used to run background tasks (e.g. cleaning up expired
data). If not provided this defaults to the main process. 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 registration-shared-secret
If set, allows registration of standard or admin accounts by anyone who If set, allows registration of standard or admin accounts by anyone who
has the shared secret, even if registration is otherwise disabled. has the shared secret, even if registration is otherwise disabled.

View file

@ -266,11 +266,19 @@ fi
# Worker-mode configuration. # Worker-mode configuration.
export MAIN_LISTENER_PORT=8008 export MAIN_LISTENER_PORT=8008
export ENABLE_MEDIA_REPO='true' 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]" MAIN_LISTENER_RESOURCES="[federation,client]"
if [ "$EXPOSE_METRICS" = "true" ]; then if [ "$EXPOSE_METRICS" = "true" ]; then
MAIN_LISTENER_RESOURCES="$(echo "$MAIN_LISTENER_RESOURCES" | tr -d ']'),metrics]" MAIN_LISTENER_RESOURCES="$(echo "$MAIN_LISTENER_RESOURCES" | tr -d ']'),metrics]"
fi 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 export MAIN_LISTENER_RESOURCES
ENABLE_REPLICATION= ENABLE_REPLICATION=

View file

@ -4,3 +4,4 @@ auto-join-room
app-service-config-file app-service-config-file
extra-setting extra-setting
bind-address bind-address
outbound-federation-worker