summary refs log tree commit diff
path: root/synapse/groups/attestations.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-07-25 11:54:33 +0100
committerGitHub <noreply@github.com>2018-07-25 11:54:33 +0100
commit1bfb5bed1d50f8e02e0baad63b94708ece78dacc (patch)
tree9624d14b6622584e27f9bd3ae84dfaf4dd8b7ab2 /synapse/groups/attestations.py
parentMerge pull request #3597 from matrix-org/erikj/did_forget (diff)
parentFix unit tests (diff)
downloadsynapse-1bfb5bed1d50f8e02e0baad63b94708ece78dacc.tar.xz
Merge pull request #3604 from matrix-org/rav/background_process_fixes
Wrap a number of things that run in the background
Diffstat (limited to 'synapse/groups/attestations.py')
-rw-r--r--synapse/groups/attestations.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/groups/attestations.py b/synapse/groups/attestations.py
index 47452700a8..4216af0a27 100644
--- a/synapse/groups/attestations.py
+++ b/synapse/groups/attestations.py
@@ -43,6 +43,7 @@ from signedjson.sign import sign_json
 from twisted.internet import defer
 
 from synapse.api.errors import SynapseError
+from synapse.metrics.background_process_metrics import run_as_background_process
 from synapse.types import get_domain_from_id
 from synapse.util.logcontext import run_in_background
 
@@ -129,7 +130,7 @@ class GroupAttestionRenewer(object):
         self.attestations = hs.get_groups_attestation_signing()
 
         self._renew_attestations_loop = self.clock.looping_call(
-            self._renew_attestations, 30 * 60 * 1000,
+            self._start_renew_attestations, 30 * 60 * 1000,
         )
 
     @defer.inlineCallbacks
@@ -151,6 +152,9 @@ class GroupAttestionRenewer(object):
 
         defer.returnValue({})
 
+    def _start_renew_attestations(self):
+        run_as_background_process("renew_attestations", self._renew_attestations)
+
     @defer.inlineCallbacks
     def _renew_attestations(self):
         """Called periodically to check if we need to update any of our attestations