summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-11-19 13:22:37 +0000
committerBrendan Abolivier <babolivier@matrix.org>2019-11-19 13:22:37 +0000
commit7c24d0f443724082376c89f9f75954d81f524a8e (patch)
treea22208882435873563f7a54d1cf2c596fe2e3663 /synapse/handlers
parentDon't apply retention policy based filtering on state events (diff)
downloadsynapse-7c24d0f443724082376c89f9f75954d81f524a8e.tar.xz
Lint
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/pagination.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py

index e1800177fa..d122c11a4d 100644 --- a/synapse/handlers/pagination.py +++ b/synapse/handlers/pagination.py
@@ -154,20 +154,17 @@ class PaginationHandler(object): # Figure out what token we should start purging at. ts = self.clock.time_msec() - max_lifetime - stream_ordering = ( - yield self.store.find_first_stream_ordering_after_ts(ts) - ) + stream_ordering = yield self.store.find_first_stream_ordering_after_ts(ts) - r = ( - yield self.store.get_room_event_after_stream_ordering( - room_id, stream_ordering, - ) + r = yield self.store.get_room_event_after_stream_ordering( + room_id, stream_ordering, ) if not r: logger.warning( "[purge] purging events not possible: No event found " "(ts %i => stream_ordering %i)", - ts, stream_ordering, + ts, + stream_ordering, ) continue @@ -186,9 +183,7 @@ class PaginationHandler(object): # the background so that it's not blocking any other operation apart from # other purges in the same room. run_as_background_process( - "_purge_history", - self._purge_history, - purge_id, room_id, token, True, + "_purge_history", self._purge_history, purge_id, room_id, token, True, ) def start_purge_history(self, room_id, token, delete_local_events=False):