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

Commit 4162c39

Browse files
Port group attestation renewal slow down from matrix-org-hotfixes (#7442)
1 parent e053c86 commit 4162c39

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

changelog.d/7442.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Run group attestation renewal in series rather than parallel for performance.

synapse/groups/attestations.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
from synapse.api.errors import HttpResponseException, RequestSendFailed, SynapseError
4747
from synapse.metrics.background_process_metrics import run_as_background_process
4848
from synapse.types import get_domain_from_id
49-
from synapse.util.async_helpers import yieldable_gather_results
5049

5150
logger = logging.getLogger(__name__)
5251

@@ -208,6 +207,5 @@ def _renew_attestation(group_user: Tuple[str, str]):
208207
"Error renewing attestation of %r in %r", user_id, group_id
209208
)
210209

211-
await yieldable_gather_results(
212-
_renew_attestation, ((row["group_id"], row["user_id"]) for row in rows)
213-
)
210+
for row in rows:
211+
await _renew_attestation((row["group_id"], row["user_id"]))

0 commit comments

Comments
 (0)