diff options
author | Erik Johnston <erik@matrix.org> | 2016-05-03 14:22:33 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-05-03 14:22:33 +0100 |
commit | 183f23f10d32ece4503f18e70296c88a1625ecff (patch) | |
tree | 4c09773f47638bc15e4f44f60cee6fb28da7bc97 /synapse/storage/event_push_actions.py | |
parent | Fix more typos in per-request metrics (diff) | |
download | synapse-183f23f10d32ece4503f18e70296c88a1625ecff.tar.xz |
Delete old pushers
Diffstat (limited to 'synapse/storage/event_push_actions.py')
-rw-r--r-- | synapse/storage/event_push_actions.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/storage/event_push_actions.py b/synapse/storage/event_push_actions.py index 86a98b6f11..312c0071f1 100644 --- a/synapse/storage/event_push_actions.py +++ b/synapse/storage/event_push_actions.py @@ -201,6 +201,18 @@ class EventPushActionsStore(SQLBaseStore): (room_id, event_id) ) + def _remove_push_actions_before_txn(self, txn, room_id, user_id, + topological_ordering): + txn.call_after( + self.get_unread_event_push_actions_by_room_for_user.invalidate_many, + (room_id, user_id, ) + ) + txn.execute( + "DELETE FROM event_push_actions" + " WHERE room_id = ? AND user_id = ? AND topological_ordering < ?", + (room_id, user_id, topological_ordering,) + ) + def _action_has_highlight(actions): for action in actions: |