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.

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

set_response(origin, transaction, code, response)

Persist how we responded to a transaction.

Returns

Deferred