synapse.federation.persistence module¶
This module contains all the persistence actions done by the federation package.
These actions are mostly only used by the replication
module.
-
class
synapse.federation.persistence.
TransactionActions
(datastore)¶ Bases:
object
Defines persistence actions that relate to handling Transactions.
-
delivered
(transaction, response_code, response_dict)¶ Marks the given Transaction as having been successfully delivered to the remote homeserver, and what the response was.
Returns: Deferred
-
have_responded
(origin, transaction)¶ Have we already responded to a transaction with the same id and origin?
Returns: Results in None if we have not previously responded to this transaction or a 2-tuple of (int, dict) representing the response code and response body. Return type: Deferred
-
prepare_to_send
(transaction)¶ Persists the Transaction we are about to send and works out the correct value for the prev_ids key.
Returns: Deferred
-
set_response
(origin, transaction, code, response)¶ Persist how we responded to a transaction.
Returns: Deferred
-