summary refs log tree commit diff
path: root/synapse/federation/persistence.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/federation/persistence.py')
-rw-r--r--synapse/federation/persistence.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/synapse/federation/persistence.py b/synapse/federation/persistence.py
index e0e4de4e8c..2286fca821 100644
--- a/synapse/federation/persistence.py
+++ b/synapse/federation/persistence.py
@@ -25,7 +25,6 @@ from .units import Pdu
 
 from synapse.util.logutils import log_function
 
-import copy
 import json
 import logging
 
@@ -41,28 +40,6 @@ class PduActions(object):
         self.store = datastore
 
     @log_function
-    def persist_received(self, pdu):
-        """ Persists the given `Pdu` that was received from a remote home
-        server.
-
-        Returns:
-            Deferred
-        """
-        return self._persist(pdu)
-
-    @defer.inlineCallbacks
-    @log_function
-    def persist_outgoing(self, pdu):
-        """ Persists the given `Pdu` that this home server created.
-
-        Returns:
-            Deferred
-        """
-        ret = yield self._persist(pdu)
-
-        defer.returnValue(ret)
-
-    @log_function
     def mark_as_processed(self, pdu):
         """ Persist the fact that we have fully processed the given `Pdu`
 
@@ -143,28 +120,6 @@ class PduActions(object):
             depth=pdu.depth
         )
 
-    @defer.inlineCallbacks
-    @log_function
-    def _persist(self, pdu):
-        kwargs = copy.copy(pdu.__dict__)
-        unrec_keys = copy.copy(pdu.unrecognized_keys)
-        del kwargs["content"]
-        kwargs["content_json"] = json.dumps(pdu.content)
-        kwargs["unrecognized_keys"] = json.dumps(unrec_keys)
-
-        logger.debug("Persisting: %s", repr(kwargs))
-
-        if pdu.is_state:
-            ret = yield self.store.persist_state(**kwargs)
-        else:
-            ret = yield self.store.persist_pdu(**kwargs)
-
-        yield self.store.update_min_depth_for_context(
-            pdu.context, pdu.depth
-        )
-
-        defer.returnValue(ret)
-
 
 class TransactionActions(object):
     """ Defines persistence actions that relate to handling Transactions.