diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-03-17 11:51:13 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-03-17 15:06:07 +0000 |
commit | 5068fb16a520d7251461decb289a960ec636d4fe (patch) | |
tree | 436d88e12af9bacc998bc2cb100b3a05e94da1ce /synapse/events | |
parent | Merge pull request #2016 from matrix-org/rav/queue_pdus_during_join (diff) | |
download | synapse-5068fb16a520d7251461decb289a960ec636d4fe.tar.xz |
Refactoring and cleanups
A few non-functional changes: * A bunch of docstrings to document types * Split `EventsStore._persist_events_txn` up a bit. Hopefully it's a bit more readable. * Rephrase `EventFederationStore._update_min_depth_for_room_txn` to avoid mind-bending conditional. * Rephrase rejected/outlier conditional in `_update_outliers_txn` to avoid mind-bending conditional.
Diffstat (limited to 'synapse/events')
-rw-r--r-- | synapse/events/snapshot.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/synapse/events/snapshot.py b/synapse/events/snapshot.py index 11605b34a3..6be18880b9 100644 --- a/synapse/events/snapshot.py +++ b/synapse/events/snapshot.py @@ -15,6 +15,32 @@ class EventContext(object): + """ + Attributes: + current_state_ids (dict[(str, str), str]): + The current state map including the current event. + (type, state_key) -> event_id + + prev_state_ids (dict[(str, str), str]): + The current state map excluding the current event. + (type, state_key) -> event_id + + state_group (int): state group id + rejected (bool|str): A rejection reason if the event was rejected, else + False + + push_actions (list[(str, list[object])]): list of (user_id, actions) + tuples + + prev_group (int): Previously persisted state group. ``None`` for an + outlier. + delta_ids (dict[(str, str), str]): Delta from ``prev_group``. + (type, state_key) -> event_id. ``None`` for an outlier. + + prev_state_events (?): XXX: is this ever set to anything other than + the empty list? + """ + __slots__ = [ "current_state_ids", "prev_state_ids", |