Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Only start background group attestation renewals on master #5389

Merged
merged 2 commits into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/5389.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix exceptions in federation reader worker caused by attempting to renew attestations, which should only happen on master worker.
7 changes: 4 additions & 3 deletions synapse/groups/attestations.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ def __init__(self, hs):
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):
Expand Down