summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-06-17 14:13:30 +0100
committerGitHub <noreply@github.com>2020-06-17 14:13:30 +0100
commitb44bdd7f7b261ec26e5d824a8caf97c6f56e1fbd (patch)
tree0493f76617ddcfdfbcc3d23cdd43e83f6d0830a2 /synapse/config
parentFetch from the r0 media path instead of the unspecced v1. (#7714) (diff)
downloadsynapse-b44bdd7f7b261ec26e5d824a8caf97c6f56e1fbd.tar.xz
Support running multiple media repos. (#7706)
This requires a new config option to specify which media repo should be
responsible for running background jobs to e.g. clear out expired URL
preview caches.
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/repository.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/config/repository.py b/synapse/config/repository.py
index b751d02d37..01009f3924 100644
--- a/synapse/config/repository.py
+++ b/synapse/config/repository.py
@@ -94,6 +94,12 @@ class ContentRepositoryConfig(Config):
         else:
             self.can_load_media_repo = True
 
+        # Whether this instance should be the one to run the background jobs to
+        # e.g clean up old URL previews.
+        self.media_instance_running_background_jobs = config.get(
+            "media_instance_running_background_jobs",
+        )
+
         self.max_upload_size = self.parse_size(config.get("max_upload_size", "10M"))
         self.max_image_pixels = self.parse_size(config.get("max_image_pixels", "32M"))
         self.max_spider_size = self.parse_size(config.get("max_spider_size", "10M"))