diff options
author | Mathieu Velten <matmaul@gmail.com> | 2020-12-31 00:16:11 +0100 |
---|---|---|
committer | Mathieu Velten <matmaul@gmail.com> | 2020-12-31 00:16:11 +0100 |
commit | dfd5e8079be144f4a0bea9431e66ef25ad587531 (patch) | |
tree | 68c635a5d23213beea67739d7c73ccfc075e2d88 | |
parent | Change to more dynamic workers config (diff) | |
download | synapse-dfd5e8079be144f4a0bea9431e66ef25ad587531.tar.xz |
Add more workers config
-rwxr-xr-x | docker/configure_workers_and_start.py | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/docker/configure_workers_and_start.py b/docker/configure_workers_and_start.py index ddd68ff7ad..232a2e62a7 100755 --- a/docker/configure_workers_and_start.py +++ b/docker/configure_workers_and_start.py @@ -27,7 +27,7 @@ DEFAULT_LISTENER_RESOURCES = ["client", "federation"] WORKERS_CONFIG = { "pusher": { "app": "synapse.app.pusher", - "listener_resources": DEFAULT_LISTENER_RESOURCES, + "listener_resources": [], "endpoint_patterns": [], "shared_extra_conf": "start_pushers: false" }, @@ -40,13 +40,36 @@ WORKERS_CONFIG = { "shared_extra_conf": "update_user_directory: false" }, "media_repository": { - "app": "synapse.app.user_dir", + "app": "synapse.app.media_repository", "listener_resources": ["media"], "endpoint_patterns": [ "^/_matrix/media/.*$|^/_synapse/admin/v1/(purge_media_cache$|(room|user)/.*/media.*$|media/.*$|quarantine_media/.*$)" ], "shared_extra_conf": "enable_media_repo: false" - } + }, + "appservice": { + "app": "synapse.app.appservice", + "listener_resources": [], + "endpoint_patterns": [], + "shared_extra_conf": "notify_appservices: false" + }, + "federation_sender": { + "app": "synapse.app.federation_sender", + "listener_resources": [], + "endpoint_patterns": [], + "shared_extra_conf": "send_federation: false" + }, + "synchrotron": { + "app": "synapse.app.generic_worker", + "listener_resources": DEFAULT_LISTENER_RESOURCES, + "endpoint_patterns": [ + "^/_matrix/client/(v2_alpha|r0)/sync$", + "^/_matrix/client/(api/v1|v2_alpha|r0)/events$", + "^/_matrix/client/(api/v1|r0)/initialSync$", + "^/_matrix/client/(api/v1|r0)/rooms/[^/]+/initialSync$", + ], + "shared_extra_conf": "" + }, } # Utility functions @@ -191,7 +214,7 @@ server { worker_config.update({"port": worker_port}) worker_config.update({"config_path": config_path}) - homeserver_config += worker_config['shared_extra_conf'] + homeserver_config += worker_config['shared_extra_conf'] + "\n" # Enable the pusher worker in supervisord supervisord_config += """ |