Remove obsolete `"app"` from worker templates

rei/cwas_extension
Olivier Wilkinson (reivilibre) 2023-11-16 14:38:08 +00:00
parent 1b238e8837
commit b39a50a43b
3 changed files with 3 additions and 21 deletions

View File

@ -6,7 +6,7 @@ command=/usr/local/bin/python -m synapse.app.complement_fork_starter
--config-path="{{ main_config_path }}" --config-path="{{ main_config_path }}"
--config-path=/conf/workers/shared.yaml --config-path=/conf/workers/shared.yaml
{%- for worker in workers %} {%- for worker in workers %}
-- {{ worker.app }} -- synapse.app.generic_worker
--config-path="{{ main_config_path }}" --config-path="{{ main_config_path }}"
--config-path=/conf/workers/shared.yaml --config-path=/conf/workers/shared.yaml
--config-path=/conf/workers/{{ worker.name }}.yaml --config-path=/conf/workers/{{ worker.name }}.yaml
@ -36,7 +36,7 @@ exitcodes=0
{% for worker in workers %} {% for worker in workers %}
[program:synapse_{{ worker.name }}] [program:synapse_{{ worker.name }}]
command=/usr/local/bin/prefix-log /usr/local/bin/python -m {{ worker.app }} command=/usr/local/bin/prefix-log /usr/local/bin/python -m synapse.app.generic_worker
--config-path="{{ main_config_path }}" --config-path="{{ main_config_path }}"
--config-path=/conf/workers/shared.yaml --config-path=/conf/workers/shared.yaml
--config-path=/conf/workers/{{ worker.name }}.yaml --config-path=/conf/workers/{{ worker.name }}.yaml

View File

@ -3,7 +3,7 @@
# Values will be change depending on whichever workers are selected when # Values will be change depending on whichever workers are selected when
# running that image. # running that image.
worker_app: "{{ app }}" worker_app: "synapse.app.generic_worker"
worker_name: "{{ name }}" worker_name: "{{ name }}"
worker_listeners: worker_listeners:

View File

@ -90,14 +90,12 @@ WORKER_PLACEHOLDER_NAME = "placeholder_name"
# have to attach by instance_map to the master process and have client endpoints. # have to attach by instance_map to the master process and have client endpoints.
WORKERS_CONFIG: Dict[str, Dict[str, Any]] = { WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"pusher": { "pusher": {
"app": "synapse.app.generic_worker",
"listener_resources": [], "listener_resources": [],
"endpoint_patterns": [], "endpoint_patterns": [],
"shared_extra_conf": {}, "shared_extra_conf": {},
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"user_dir": { "user_dir": {
"app": "synapse.app.generic_worker",
"listener_resources": ["client"], "listener_resources": ["client"],
"endpoint_patterns": [ "endpoint_patterns": [
"^/_matrix/client/(api/v1|r0|v3|unstable)/user_directory/search$" "^/_matrix/client/(api/v1|r0|v3|unstable)/user_directory/search$"
@ -108,7 +106,6 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"media_repository": { "media_repository": {
"app": "synapse.app.generic_worker",
"listener_resources": ["media"], "listener_resources": ["media"],
"endpoint_patterns": [ "endpoint_patterns": [
"^/_matrix/media/", "^/_matrix/media/",
@ -126,7 +123,6 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "enable_media_repo: true", "worker_extra_conf": "enable_media_repo: true",
}, },
"appservice": { "appservice": {
"app": "synapse.app.generic_worker",
"listener_resources": [], "listener_resources": [],
"endpoint_patterns": [], "endpoint_patterns": [],
"shared_extra_conf": { "shared_extra_conf": {
@ -135,14 +131,12 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"federation_sender": { "federation_sender": {
"app": "synapse.app.generic_worker",
"listener_resources": [], "listener_resources": [],
"endpoint_patterns": [], "endpoint_patterns": [],
"shared_extra_conf": {}, "shared_extra_conf": {},
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"synchrotron": { "synchrotron": {
"app": "synapse.app.generic_worker",
"listener_resources": ["client"], "listener_resources": ["client"],
"endpoint_patterns": [ "endpoint_patterns": [
"^/_matrix/client/(v2_alpha|r0|v3)/sync$", "^/_matrix/client/(v2_alpha|r0|v3)/sync$",
@ -154,7 +148,6 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"client_reader": { "client_reader": {
"app": "synapse.app.generic_worker",
"listener_resources": ["client"], "listener_resources": ["client"],
"endpoint_patterns": [ "endpoint_patterns": [
"^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$", "^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$",
@ -189,7 +182,6 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"federation_reader": { "federation_reader": {
"app": "synapse.app.generic_worker",
"listener_resources": ["federation"], "listener_resources": ["federation"],
"endpoint_patterns": [ "endpoint_patterns": [
"^/_matrix/federation/(v1|v2)/event/", "^/_matrix/federation/(v1|v2)/event/",
@ -216,21 +208,18 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"federation_inbound": { "federation_inbound": {
"app": "synapse.app.generic_worker",
"listener_resources": ["federation"], "listener_resources": ["federation"],
"endpoint_patterns": ["/_matrix/federation/(v1|v2)/send/"], "endpoint_patterns": ["/_matrix/federation/(v1|v2)/send/"],
"shared_extra_conf": {}, "shared_extra_conf": {},
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"event_persister": { "event_persister": {
"app": "synapse.app.generic_worker",
"listener_resources": ["replication"], "listener_resources": ["replication"],
"endpoint_patterns": [], "endpoint_patterns": [],
"shared_extra_conf": {}, "shared_extra_conf": {},
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"background_worker": { "background_worker": {
"app": "synapse.app.generic_worker",
"listener_resources": [], "listener_resources": [],
"endpoint_patterns": [], "endpoint_patterns": [],
# This worker cannot be sharded. Therefore, there should only ever be one # This worker cannot be sharded. Therefore, there should only ever be one
@ -239,7 +228,6 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"event_creator": { "event_creator": {
"app": "synapse.app.generic_worker",
"listener_resources": ["client"], "listener_resources": ["client"],
"endpoint_patterns": [ "endpoint_patterns": [
"^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact", "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact",
@ -253,14 +241,12 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"frontend_proxy": { "frontend_proxy": {
"app": "synapse.app.generic_worker",
"listener_resources": ["client", "replication"], "listener_resources": ["client", "replication"],
"endpoint_patterns": ["^/_matrix/client/(api/v1|r0|v3|unstable)/keys/upload"], "endpoint_patterns": ["^/_matrix/client/(api/v1|r0|v3|unstable)/keys/upload"],
"shared_extra_conf": {}, "shared_extra_conf": {},
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"account_data": { "account_data": {
"app": "synapse.app.generic_worker",
"listener_resources": ["client", "replication"], "listener_resources": ["client", "replication"],
"endpoint_patterns": [ "endpoint_patterns": [
"^/_matrix/client/(r0|v3|unstable)/.*/tags", "^/_matrix/client/(r0|v3|unstable)/.*/tags",
@ -270,14 +256,12 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"presence": { "presence": {
"app": "synapse.app.generic_worker",
"listener_resources": ["client", "replication"], "listener_resources": ["client", "replication"],
"endpoint_patterns": ["^/_matrix/client/(api/v1|r0|v3|unstable)/presence/"], "endpoint_patterns": ["^/_matrix/client/(api/v1|r0|v3|unstable)/presence/"],
"shared_extra_conf": {}, "shared_extra_conf": {},
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"receipts": { "receipts": {
"app": "synapse.app.generic_worker",
"listener_resources": ["client", "replication"], "listener_resources": ["client", "replication"],
"endpoint_patterns": [ "endpoint_patterns": [
"^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt", "^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt",
@ -287,14 +271,12 @@ WORKERS_CONFIG: Dict[str, Dict[str, Any]] = {
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"to_device": { "to_device": {
"app": "synapse.app.generic_worker",
"listener_resources": ["client", "replication"], "listener_resources": ["client", "replication"],
"endpoint_patterns": ["^/_matrix/client/(r0|v3|unstable)/sendToDevice/"], "endpoint_patterns": ["^/_matrix/client/(r0|v3|unstable)/sendToDevice/"],
"shared_extra_conf": {}, "shared_extra_conf": {},
"worker_extra_conf": "", "worker_extra_conf": "",
}, },
"typing": { "typing": {
"app": "synapse.app.generic_worker",
"listener_resources": ["client", "replication"], "listener_resources": ["client", "replication"],
"endpoint_patterns": [ "endpoint_patterns": [
"^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing" "^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing"