diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-06-16 11:29:45 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-06-16 11:29:45 +0100 |
commit | 80a1bc7db517298baec24c1f11a144552719fb7b (patch) | |
tree | 7add435a079f0f9aabab5620a998b6eae2e6c86e /synapse/config | |
parent | Merge remote-tracking branch 'origin/develop' into markjh/worker_config (diff) | |
download | synapse-80a1bc7db517298baec24c1f11a144552719fb7b.tar.xz |
Comment on what's going on in clobber_with_worker_config
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/workers.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/synapse/config/workers.py b/synapse/config/workers.py index fd19e38b87..4f4658c0a8 100644 --- a/synapse/config/workers.py +++ b/synapse/config/workers.py @@ -35,8 +35,19 @@ Worker = collections.namedtuple("Worker", [ def clobber_with_worker_config(config, worker_config): """Overrides some of the keys of the main config with worker-specific - values.""" + values. We only need to override the keys that are accessed deep + withing synapse code. Most of the keys that we want to override in + the workers are accessed in setup code that is rewritten specifically + for the workers. In that new code we can access the worker config directly, + so we don't need to override the values in the main config.""" + + # TODO: The event_cache_size is accessed in the db setup. It should be + # possible to rejigg that code so that the cache size is pulled from the + # worker config directly. config.event_cache_size = worker_config.event_cache_size + + # TODO: The replication_url should only be accessed within worker specific + # code so it really shouldn't need to be clobbered in the main config. config.replication_url = worker_config.replication_url |