summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-31 15:25:21 +0000
committerErik Johnston <erik@matrix.org>2019-10-31 15:26:00 +0000
commitf91f2a1f92ee2eb5758184ef0df66490592587d1 (patch)
treefeee71257fc561eec63a635fff5dc8f27ebaff7d /synapse/storage
parentFix purge room API (diff)
downloadsynapse-f91f2a1f92ee2eb5758184ef0df66490592587d1.tar.xz
Docstrings
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/data_stores/main/events.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/synapse/storage/data_stores/main/events.py b/synapse/storage/data_stores/main/events.py
index a904a71570..108b2e8bd5 100644
--- a/synapse/storage/data_stores/main/events.py
+++ b/synapse/storage/data_stores/main/events.py
@@ -19,6 +19,7 @@ import itertools
 import logging
 from collections import Counter as c_counter, OrderedDict, namedtuple
 from functools import wraps
+from typing import Set
 
 from six import iteritems, text_type
 from six.moves import range
@@ -1370,8 +1371,8 @@ class EventsStore(
                 state groups).
 
         Returns:
-            Deferred[set[int]]: The set of state groups that reference deleted
-            events.
+            Deferred[set[int]]: The set of state groups that are referenced by
+            deleted events.
         """
 
         return self.runInteraction(
@@ -1711,9 +1712,16 @@ class EventsStore(
 
         logger.info("[purge] done")
 
-    def purge_unreferenced_state_groups(self, room_id, state_groups_to_delete):
+    def purge_unreferenced_state_groups(
+        self, room_id: str, state_groups_to_delete: Set[int]
+    ) -> defer.Deferred:
         """Deletes no longer referenced state groups and de-deltas any state
         groups that reference them.
+
+        Args:
+            room_id: The room the state groups belong to (must all be in the
+                same room).
+            state_groups_to_delete: Set of all state groups to delete.
         """
 
         return self.runInteraction(