summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-03-13 17:38:21 +0000
committerErik Johnston <erik@matrix.org>2018-03-13 17:38:21 +0000
commitdf8ff682a72362acde7d99f7235ad4d4f87817e0 (patch)
tree465d16f649d2ceb64858beabe2a4381a49fda95c /synapse
parentMerge pull request #2978 from matrix-org/erikj/refactor_replication_layer (diff)
downloadsynapse-df8ff682a72362acde7d99f7235ad4d4f87817e0.tar.xz
Only update remote profile cache on master
Diffstat (limited to '')
-rw-r--r--synapse/handlers/profile.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py
index cb710fe796..3465a787ab 100644
--- a/synapse/handlers/profile.py
+++ b/synapse/handlers/profile.py
@@ -38,7 +38,10 @@ class ProfileHandler(BaseHandler):
 
         self.user_directory_handler = hs.get_user_directory_handler()
 
-        self.clock.looping_call(self._update_remote_profile_cache, self.PROFILE_UPDATE_MS)
+        if hs.config.worker_app is None:
+            self.clock.looping_call(
+                self._update_remote_profile_cache, self.PROFILE_UPDATE_MS,
+            )
 
     @defer.inlineCallbacks
     def get_profile(self, user_id):