diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-04-27 11:29:27 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-04-27 12:55:51 +0100 |
commit | 2a13af23bc0561ab48e0a90528231c40ee209724 (patch) | |
tree | 55b806d5723d009cee8c9e925530dc5cedb1c37a /synapse/groups | |
parent | Merge pull request #3134 from matrix-org/erikj/fix_admin_media_api (diff) | |
download | synapse-2a13af23bc0561ab48e0a90528231c40ee209724.tar.xz |
Use run_in_background in preference to preserve_fn
While I was going through uses of preserve_fn for other PRs, I converted places which only use the wrapped function once to use run_in_background, to avoid creating the function object.
Diffstat (limited to 'synapse/groups')
-rw-r--r-- | synapse/groups/attestations.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/groups/attestations.py b/synapse/groups/attestations.py index 1fb709e6c3..5f53f17954 100644 --- a/synapse/groups/attestations.py +++ b/synapse/groups/attestations.py @@ -42,7 +42,7 @@ from twisted.internet import defer from synapse.api.errors import SynapseError from synapse.types import get_domain_from_id -from synapse.util.logcontext import preserve_fn +from synapse.util.logcontext import run_in_background from signedjson.sign import sign_json @@ -192,4 +192,4 @@ class GroupAttestionRenewer(object): group_id = row["group_id"] user_id = row["user_id"] - preserve_fn(_renew_attestation)(group_id, user_id) + run_in_background(_renew_attestation, group_id, user_id) |