mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 20:49:24 -05:00
Port group attestation renewal slow down from matrix-org-hotfixes (#7442)
This commit is contained in:
parent
e053c86a96
commit
4162c39dcf
1
changelog.d/7442.misc
Normal file
1
changelog.d/7442.misc
Normal file
@ -0,0 +1 @@
|
||||
Run group attestation renewal in series rather than parallel for performance.
|
@ -46,7 +46,6 @@ from twisted.internet import defer
|
||||
from synapse.api.errors import HttpResponseException, RequestSendFailed, SynapseError
|
||||
from synapse.metrics.background_process_metrics import run_as_background_process
|
||||
from synapse.types import get_domain_from_id
|
||||
from synapse.util.async_helpers import yieldable_gather_results
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -208,6 +207,5 @@ class GroupAttestionRenewer(object):
|
||||
"Error renewing attestation of %r in %r", user_id, group_id
|
||||
)
|
||||
|
||||
await yieldable_gather_results(
|
||||
_renew_attestation, ((row["group_id"], row["user_id"]) for row in rows)
|
||||
)
|
||||
for row in rows:
|
||||
await _renew_attestation((row["group_id"], row["user_id"]))
|
||||
|
Loading…
Reference in New Issue
Block a user