mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:06:05 -04:00
squidge to 79 columns as per pep8
This commit is contained in:
parent
8ada2d2018
commit
2b1acb7671
3 changed files with 36 additions and 19 deletions
|
@ -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 "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue