summary refs log tree commit diff
path: root/synapse/config/server.py
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2017-11-22 16:46:09 +0000
committerGitHub <noreply@github.com>2017-11-22 16:46:09 +0000
commit79eba878a78acc59908505d41c7890a29f5cc41b (patch)
tree6bbaf289bb72c86a5d1002f69934bd6f20e0ad29 /synapse/config/server.py
parentMerge pull request #2700 from matrix-org/rav/worker_docs (diff)
parentAdd config option to disable media_repo on main synapse (diff)
downloadsynapse-79eba878a78acc59908505d41c7890a29f5cc41b.tar.xz
Merge pull request #2701 from matrix-org/rav/one_mediarepo_to_rule_them_all
Try to avoid having multiple PreviewUrlResource instances
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r--synapse/config/server.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 4d9193536d..edb90a1348 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -41,6 +41,12 @@ class ServerConfig(Config):
         # false only if we are updating the user directory in a worker
         self.update_user_directory = config.get("update_user_directory", True)
 
+        # whether to enable the media repository endpoints. This should be set
+        # to false if the media repository is running as a separate endpoint;
+        # doing so ensures that we will not run cache cleanup jobs on the
+        # master, potentially causing inconsistency.
+        self.enable_media_repo = config.get("enable_media_repo", True)
+
         self.filter_timeline_limit = config.get("filter_timeline_limit", -1)
 
         # Whether we should block invites sent to users on this server