From 22e416b7261d4dd583cd6933481c01aeec318f83 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 17 Apr 2018 12:17:16 +0100 Subject: [PATCH] Update profile cache only on master and same for the profile replication --- synapse/handlers/profile.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index bf91eedb7..a06f59624 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -45,16 +45,14 @@ class ProfileHandler(BaseHandler): self.http_client = hs.get_simple_http_client() - 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, ) - reactor.callWhenRunning(self._assign_profile_replication_batches) - reactor.callWhenRunning(self._replicate_profiles) - self.clock.looping_call(self._replicate_profiles, self.PROFILE_REPLICATE_INTERVAL) + reactor.callWhenRunning(self._assign_profile_replication_batches) + reactor.callWhenRunning(self._replicate_profiles) + self.clock.looping_call(self._replicate_profiles, self.PROFILE_REPLICATE_INTERVAL) @defer.inlineCallbacks def _assign_profile_replication_batches(self):