Remove unused param from get_max_token
This commit is contained in:
parent
b8cdec92c7
commit
42109a62a4
|
@ -168,7 +168,7 @@ class AccountDataStore(SQLBaseStore):
|
|||
"add_room_account_data", add_account_data_txn, next_id
|
||||
)
|
||||
|
||||
result = yield self._account_data_id_gen.get_max_token(self)
|
||||
result = yield self._account_data_id_gen.get_max_token()
|
||||
defer.returnValue(result)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
@ -207,7 +207,7 @@ class AccountDataStore(SQLBaseStore):
|
|||
"add_user_account_data", add_account_data_txn, next_id
|
||||
)
|
||||
|
||||
result = yield self._account_data_id_gen.get_max_token(self)
|
||||
result = yield self._account_data_id_gen.get_max_token()
|
||||
defer.returnValue(result)
|
||||
|
||||
def _update_max_stream_id(self, txn, next_id):
|
||||
|
|
|
@ -131,7 +131,7 @@ class EventsStore(SQLBaseStore):
|
|||
except _RollbackButIsFineException:
|
||||
pass
|
||||
|
||||
max_persisted_id = yield self._stream_id_gen.get_max_token(self)
|
||||
max_persisted_id = yield self._stream_id_gen.get_max_token()
|
||||
defer.returnValue((stream_ordering, max_persisted_id))
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
|
@ -31,7 +31,7 @@ class ReceiptsStore(SQLBaseStore):
|
|||
super(ReceiptsStore, self).__init__(hs)
|
||||
|
||||
self._receipts_stream_cache = StreamChangeCache(
|
||||
"ReceiptsRoomChangeCache", self._receipts_id_gen.get_max_token(None)
|
||||
"ReceiptsRoomChangeCache", self._receipts_id_gen.get_max_token()
|
||||
)
|
||||
|
||||
@cached(num_args=2)
|
||||
|
@ -222,7 +222,7 @@ class ReceiptsStore(SQLBaseStore):
|
|||
defer.returnValue(results)
|
||||
|
||||
def get_max_receipt_stream_id(self):
|
||||
return self._receipts_id_gen.get_max_token(self)
|
||||
return self._receipts_id_gen.get_max_token()
|
||||
|
||||
def insert_linearized_receipt_txn(self, txn, room_id, receipt_type,
|
||||
user_id, event_id, data, stream_id):
|
||||
|
@ -347,7 +347,7 @@ class ReceiptsStore(SQLBaseStore):
|
|||
room_id, receipt_type, user_id, event_ids, data
|
||||
)
|
||||
|
||||
max_persisted_id = yield self._stream_id_gen.get_max_token(self)
|
||||
max_persisted_id = yield self._stream_id_gen.get_max_token()
|
||||
|
||||
defer.returnValue((stream_id, max_persisted_id))
|
||||
|
||||
|
|
|
@ -531,7 +531,7 @@ class StreamStore(SQLBaseStore):
|
|||
|
||||
@defer.inlineCallbacks
|
||||
def get_room_events_max_id(self, direction='f'):
|
||||
token = yield self._stream_id_gen.get_max_token(self)
|
||||
token = yield self._stream_id_gen.get_max_token()
|
||||
if direction != 'b':
|
||||
defer.returnValue("s%d" % (token,))
|
||||
else:
|
||||
|
|
|
@ -30,7 +30,7 @@ class TagsStore(SQLBaseStore):
|
|||
Returns:
|
||||
A deferred int.
|
||||
"""
|
||||
return self._account_data_id_gen.get_max_token(self)
|
||||
return self._account_data_id_gen.get_max_token()
|
||||
|
||||
@cached()
|
||||
def get_tags_for_user(self, user_id):
|
||||
|
@ -147,7 +147,7 @@ class TagsStore(SQLBaseStore):
|
|||
|
||||
self.get_tags_for_user.invalidate((user_id,))
|
||||
|
||||
result = yield self._account_data_id_gen.get_max_token(self)
|
||||
result = yield self._account_data_id_gen.get_max_token()
|
||||
defer.returnValue(result)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
@ -169,7 +169,7 @@ class TagsStore(SQLBaseStore):
|
|||
|
||||
self.get_tags_for_user.invalidate((user_id,))
|
||||
|
||||
result = yield self._account_data_id_gen.get_max_token(self)
|
||||
result = yield self._account_data_id_gen.get_max_token()
|
||||
defer.returnValue(result)
|
||||
|
||||
def _update_revision_txn(self, txn, user_id, room_id, next_id):
|
||||
|
|
|
@ -130,11 +130,9 @@ class StreamIdGenerator(object):
|
|||
|
||||
return manager()
|
||||
|
||||
def get_max_token(self, *args):
|
||||
def get_max_token(self):
|
||||
"""Returns the maximum stream id such that all stream ids less than or
|
||||
equal to it have been successfully persisted.
|
||||
|
||||
Used to take a DataStore param, which is no longer needed.
|
||||
"""
|
||||
with self._lock:
|
||||
if self._unfinished_ids:
|
||||
|
|
Loading…
Reference in New Issue