mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-13 06:02:18 -04:00
Fix handling of stream tokens for push. (#8943)
Removes faulty assertions and fixes the logic to ensure the max stream token is always set.
This commit is contained in:
parent
6d02eb22df
commit
b3a4b53587
6 changed files with 18 additions and 50 deletions
|
@ -894,16 +894,6 @@ class EventPushActionsStore(EventPushActionsWorkerStore):
|
|||
pa["actions"] = _deserialize_action(pa["actions"], pa["highlight"])
|
||||
return push_actions
|
||||
|
||||
async def get_latest_push_action_stream_ordering(self):
|
||||
def f(txn):
|
||||
txn.execute("SELECT MAX(stream_ordering) FROM event_push_actions")
|
||||
return txn.fetchone()
|
||||
|
||||
result = await self.db_pool.runInteraction(
|
||||
"get_latest_push_action_stream_ordering", f
|
||||
)
|
||||
return result[0] or 0
|
||||
|
||||
def _remove_old_push_actions_before_txn(
|
||||
self, txn, room_id, user_id, stream_ordering
|
||||
):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue