forked from MirrorHub/synapse
rename delete_old_state -> purge_history
(beacause it deletes more than state)
This commit is contained in:
parent
03dd745fe2
commit
671540dccf
2 changed files with 9 additions and 9 deletions
|
@ -72,7 +72,7 @@ class MessageHandler(BaseHandler):
|
||||||
depth = event.depth
|
depth = event.depth
|
||||||
|
|
||||||
with (yield self.pagination_lock.write(room_id)):
|
with (yield self.pagination_lock.write(room_id)):
|
||||||
yield self.store.delete_old_state(room_id, depth)
|
yield self.store.purge_history(room_id, depth)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def get_messages(self, requester, room_id=None, pagin_config=None,
|
def get_messages(self, requester, room_id=None, pagin_config=None,
|
||||||
|
|
|
@ -2031,16 +2031,16 @@ class EventsStore(SQLBaseStore):
|
||||||
)
|
)
|
||||||
return self.runInteraction("get_all_new_events", get_all_new_events_txn)
|
return self.runInteraction("get_all_new_events", get_all_new_events_txn)
|
||||||
|
|
||||||
def delete_old_state(self, room_id, topological_ordering):
|
def purge_history(self, room_id, topological_ordering):
|
||||||
return self.runInteraction(
|
"""Deletes room history before a certain point
|
||||||
"delete_old_state",
|
|
||||||
self._delete_old_state_txn, room_id, topological_ordering
|
|
||||||
)
|
|
||||||
|
|
||||||
def _delete_old_state_txn(self, txn, room_id, topological_ordering):
|
|
||||||
"""Deletes old room state
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
return self.runInteraction(
|
||||||
|
"purge_history",
|
||||||
|
self._purge_history_txn, room_id, topological_ordering
|
||||||
|
)
|
||||||
|
|
||||||
|
def _purge_history_txn(self, txn, room_id, topological_ordering):
|
||||||
# Tables that should be pruned:
|
# Tables that should be pruned:
|
||||||
# event_auth
|
# event_auth
|
||||||
# event_backward_extremities
|
# event_backward_extremities
|
||||||
|
|
Loading…
Reference in a new issue