mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 03:03:50 +01:00
Add some comments to _start_key_lookups
This commit is contained in:
parent
2a4b9ea233
commit
afbd773dc6
1 changed files with 8 additions and 0 deletions
|
@ -140,6 +140,12 @@ class Keyring(object):
|
||||||
Args:
|
Args:
|
||||||
verify_requests (List[VerifyKeyRequest]):
|
verify_requests (List[VerifyKeyRequest]):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# create a deferred for each server we're going to look up the keys
|
||||||
|
# for; we'll resolve them once we have completed our lookups.
|
||||||
|
# These will be passed into wait_for_previous_lookups to block
|
||||||
|
# any other lookups until we have finished.
|
||||||
|
# The deferreds are called with no logcontext.
|
||||||
server_to_deferred = {
|
server_to_deferred = {
|
||||||
rq.server_name: defer.Deferred()
|
rq.server_name: defer.Deferred()
|
||||||
for rq in verify_requests
|
for rq in verify_requests
|
||||||
|
@ -162,6 +168,8 @@ class Keyring(object):
|
||||||
# When we've finished fetching all the keys for a given server_name,
|
# When we've finished fetching all the keys for a given server_name,
|
||||||
# resolve the deferred passed to `wait_for_previous_lookups` so that
|
# resolve the deferred passed to `wait_for_previous_lookups` so that
|
||||||
# any lookups waiting will proceed.
|
# any lookups waiting will proceed.
|
||||||
|
#
|
||||||
|
# map from server name to a set of request ids
|
||||||
server_to_request_ids = {}
|
server_to_request_ids = {}
|
||||||
|
|
||||||
def remove_deferreds(res, server_name, verify_request):
|
def remove_deferreds(res, server_name, verify_request):
|
||||||
|
|
Loading…
Reference in a new issue