summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2014-12-10 00:03:55 +0000
committerMatthew Hodgson <matthew@matrix.org>2014-12-10 00:03:55 +0000
commit2b1acb7671e33baeb01be2f0facd20cd6ea7e3b5 (patch)
treeb89d71d74e72bb9713e5b891ad401f9ac3940324 /synapse/storage
parentfix UTs by telling all the mock stores about the new methods for tracking ret... (diff)
downloadsynapse-2b1acb7671e33baeb01be2f0facd20cd6ea7e3b5.tar.xz
squidge to 79 columns as per pep8
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/transactions.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/synapse/storage/transactions.py b/synapse/storage/transactions.py
index 237b024451..2b16787695 100644
--- a/synapse/storage/transactions.py
+++ b/synapse/storage/transactions.py
@@ -28,7 +28,8 @@ class TransactionStore(SQLBaseStore):
     """A collection of queries for handling PDUs.
     """
     
-    # a write-through cache of DestinationsTable.EntryType indexed by destination string
+    # a write-through cache of DestinationsTable.EntryType indexed by
+    # destination string
     destination_retry_cache = {}
 
     def get_received_txn_response(self, transaction_id, origin):
@@ -238,7 +239,8 @@ class TransactionStore(SQLBaseStore):
             else:
                 return None
         
-    def set_destination_retry_timings(self, destination, retry_last_ts, retry_interval):
+    def set_destination_retry_timings(self, destination,
+                                      retry_last_ts, retry_interval):
         """Sets the current retry timings for a given destination.
         Both timings should be zero if retrying is no longer occuring.
         
@@ -249,15 +251,19 @@ class TransactionStore(SQLBaseStore):
         """
         
         self.destination_retry_cache[destination] = (
-            DestinationsTable.EntryType(destination, retry_last_ts, retry_interval)
+            DestinationsTable.EntryType(destination,
+                                        retry_last_ts, retry_interval)
         )
         
-        # xxx: we could chose to not bother persisting this if our cache things this is a NOOP
+        # XXX: we could chose to not bother persisting this if our cache thinks
+        # this is a NOOP
         return self.runInteraction(
             "set_destination_retry_timings",
-            self._set_destination_retry_timings, destination, retry_last_ts, retry_interval)
+            self._set_destination_retry_timings, destination, 
+            retry_last_ts, retry_interval)
             
-    def _set_destination_retry_timings(cls, txn, destination, retry_last_ts, retry_interval):
+    def _set_destination_retry_timings(cls, txn, destination,
+                                       retry_last_ts, retry_interval):
 
         query = (
             "INSERT OR REPLACE INTO %s "