summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-05-16 10:52:06 +0100
committerErik Johnston <erik@matrix.org>2018-05-16 10:52:06 +0100
commitc945af8799671db8fdfc47acf6b286520fb08715 (patch)
tree66092c152a790c4e9f477189bdf3eb7dbc0aec78 /synapse
parentMake purge_history operate on tokens (diff)
downloadsynapse-c945af8799671db8fdfc47acf6b286520fb08715.tar.xz
Move and rename variable
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/events.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index f65e18c1ee..22699cb689 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -1825,8 +1825,10 @@ class EventsStore(EventsWorkerStore):
         )
 
     def _purge_history_txn(
-        self, txn, room_id, token, delete_local_events,
+        self, txn, room_id, token_str, delete_local_events,
     ):
+        token = RoomStreamToken.parse(token_str)
+
         # Tables that should be pruned:
         #     event_auth
         #     event_backward_extremities
@@ -1855,8 +1857,6 @@ class EventsStore(EventsWorkerStore):
         # furthermore, we might already have the table from a previous (failed)
         # purge attempt, so let's drop the table first.
 
-        token = RoomStreamToken.parse(token)
-
         txn.execute("DROP TABLE IF EXISTS events_to_purge")
 
         txn.execute(