summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-17 13:54:29 +0100
committerGitHub <noreply@github.com>2019-06-17 13:54:29 +0100
commit414d2ca3a6342fc78fc402c43ff98d0079822649 (patch)
tree06a7560b022b39aec2c31764ce93619ed1974b51
parentMove SyTest to Buildkite (#5459) (diff)
parentNewsfile (diff)
downloadsynapse-414d2ca3a6342fc78fc402c43ff98d0079822649.tar.xz
Merge pull request #5389 from matrix-org/erikj/renew_attestations_on_master
Only start background group attestation renewals on master
-rw-r--r--changelog.d/5389.bugfix1
-rw-r--r--synapse/groups/attestations.py7
2 files changed, 5 insertions, 3 deletions
diff --git a/changelog.d/5389.bugfix b/changelog.d/5389.bugfix
new file mode 100644

index 0000000000..dd648e26c8 --- /dev/null +++ b/changelog.d/5389.bugfix
@@ -0,0 +1 @@ +Fix exceptions in federation reader worker caused by attempting to renew attestations, which should only happen on master worker. diff --git a/synapse/groups/attestations.py b/synapse/groups/attestations.py
index e5dda1975f..469ab8ac7b 100644 --- a/synapse/groups/attestations.py +++ b/synapse/groups/attestations.py
@@ -132,9 +132,10 @@ class GroupAttestionRenewer(object): self.is_mine_id = hs.is_mine_id self.attestations = hs.get_groups_attestation_signing() - self._renew_attestations_loop = self.clock.looping_call( - self._start_renew_attestations, 30 * 60 * 1000, - ) + if not hs.config.worker_app: + self._renew_attestations_loop = self.clock.looping_call( + self._start_renew_attestations, 30 * 60 * 1000, + ) @defer.inlineCallbacks def on_renew_attestation(self, group_id, user_id, content):