summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-08-22 10:11:21 +0100
committerErik Johnston <erik@matrix.org>2018-08-22 10:11:21 +0100
commita81f1408807683d212b7bf3c4f5f36df4b0e0d33 (patch)
tree4079004d9ebd3f44c2c8884772fc2ceae6e80136
parentRemove redundant vars (diff)
downloadsynapse-a81f1408807683d212b7bf3c4f5f36df4b0e0d33.tar.xz
Add assert to ensure handler is only run on master
-rw-r--r--synapse/handlers/profile.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py
index ec9cb1f50c..278f131d5e 100644
--- a/synapse/handlers/profile.py
+++ b/synapse/handlers/profile.py
@@ -282,6 +282,8 @@ class MasterProfileHandler(WorkerProfileHandler):
     def __init__(self, hs):
         super(MasterProfileHandler, self).__init__(hs)
 
+        assert hs.config.worker_app is None
+
         self.clock.looping_call(
             self._start_update_remote_profile_cache, self.PROFILE_UPDATE_MS,
         )