mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-21 03:42:55 +03:00
Update profile cache only on master
and same for the profile replication
This commit is contained in:
parent
b4b7c80181
commit
22e416b726
1 changed files with 3 additions and 5 deletions
|
@ -45,16 +45,14 @@ class ProfileHandler(BaseHandler):
|
||||||
|
|
||||||
self.http_client = hs.get_simple_http_client()
|
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:
|
if hs.config.worker_app is None:
|
||||||
self.clock.looping_call(
|
self.clock.looping_call(
|
||||||
self._update_remote_profile_cache, self.PROFILE_UPDATE_MS,
|
self._update_remote_profile_cache, self.PROFILE_UPDATE_MS,
|
||||||
)
|
)
|
||||||
|
|
||||||
reactor.callWhenRunning(self._assign_profile_replication_batches)
|
reactor.callWhenRunning(self._assign_profile_replication_batches)
|
||||||
reactor.callWhenRunning(self._replicate_profiles)
|
reactor.callWhenRunning(self._replicate_profiles)
|
||||||
self.clock.looping_call(self._replicate_profiles, self.PROFILE_REPLICATE_INTERVAL)
|
self.clock.looping_call(self._replicate_profiles, self.PROFILE_REPLICATE_INTERVAL)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _assign_profile_replication_batches(self):
|
def _assign_profile_replication_batches(self):
|
||||||
|
|
Loading…
Reference in a new issue