summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-06-06 14:54:59 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2019-06-06 14:54:59 +0100
commit828cdbbcd8792224c4e9ecf3057f2806be75ff98 (patch)
tree52f98cf10cb0fcae403674c0473aa6e8ed6dc0ba
parentfix bug? (diff)
downloadsynapse-828cdbbcd8792224c4e9ecf3057f2806be75ff98.tar.xz
Run bg update on the master process
-rw-r--r--synapse/storage/registration.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index 8ad1911164..43650d7a48 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -39,11 +39,6 @@ class RegistrationWorkerStore(SQLBaseStore):
         self.config = hs.config
         self.clock = hs.get_clock()
 
-        # Create a background job for culling expired 3PID validity tokens
-        hs.get_clock().looping_call(
-            self.cull_expired_threepid_validation_tokens, THIRTY_MINUTES_IN_MS,
-        )
-
     @cached()
     def get_user_by_id(self, user_id):
         return self._simple_select_one(
@@ -603,6 +598,11 @@ class RegistrationStore(
             "user_threepids_grandfather", self._bg_user_threepids_grandfather,
         )
 
+        # Create a background job for culling expired 3PID validity tokens
+        hs.get_clock().looping_call(
+            self.cull_expired_threepid_validation_tokens, THIRTY_MINUTES_IN_MS,
+        )
+
     @defer.inlineCallbacks
     def add_access_token_to_user(self, user_id, token, device_id=None):
         """Adds an access token for the given user.