0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-16 19:23:51 +01:00

Rename variable

This commit is contained in:
Erik Johnston 2017-04-10 12:44:17 +01:00
parent 8c5f03cec7
commit 0018491af2

View file

@ -477,12 +477,12 @@ ParsedFederationStreamData = namedtuple("ParsedFederationStreamData", (
)) ))
def process_rows_for_federation(federation_sender, rows): def process_rows_for_federation(transaction_queue, rows):
"""Parse a list of rows from the federation stream and put them in the """Parse a list of rows from the federation stream and put them in the
transaction queue ready for sending to the relevant homeservers. transaction queue ready for sending to the relevant homeservers.
Args: Args:
federation_sender (TransactionQueue) transaction_queue (TransactionQueue)
rows (list(synapse.replication.tcp.streams.FederationStreamRow)) rows (list(synapse.replication.tcp.streams.FederationStreamRow))
""" """
@ -509,23 +509,23 @@ def process_rows_for_federation(federation_sender, rows):
parsed_row.add_to_buffer(buff) parsed_row.add_to_buffer(buff)
for destination, states in buff.presence.iteritems(): for destination, states in buff.presence.iteritems():
federation_sender.send_presence(destination, states) transaction_queue.send_presence(destination, states)
for destination, edu_map in buff.keyed_edus.iteritems(): for destination, edu_map in buff.keyed_edus.iteritems():
for key, edu in edu_map.items(): for key, edu in edu_map.items():
federation_sender.send_edu( transaction_queue.send_edu(
edu.destination, edu.edu_type, edu.content, key=key, edu.destination, edu.edu_type, edu.content, key=key,
) )
for destination, edu_list in buff.edus.iteritems(): for destination, edu_list in buff.edus.iteritems():
for edu in edu_list: for edu in edu_list:
federation_sender.send_edu( transaction_queue.send_edu(
edu.destination, edu.edu_type, edu.content, key=None, edu.destination, edu.edu_type, edu.content, key=None,
) )
for destination, failure_list in buff.failures.iteritems(): for destination, failure_list in buff.failures.iteritems():
for failure in failure_list: for failure in failure_list:
federation_sender.send_failure(destination, failure) transaction_queue.send_failure(destination, failure)
for destination in buff.device_destinations: for destination in buff.device_destinations:
federation_sender.send_device_messages(destination) transaction_queue.send_device_messages(destination)