diff options
author | Erik Johnston <erik@matrix.org> | 2016-04-12 11:58:04 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-04-12 11:58:04 +0100 |
commit | 762ada1e079350df46fc8e1c923b7c5beeb533c0 (patch) | |
tree | fd030999cf947b9bbb5806ef55617432d465a18a /synapse/storage | |
parent | Add comment (diff) | |
download | synapse-762ada1e079350df46fc8e1c923b7c5beeb533c0.tar.xz |
Add back backfilled parameter that was removed
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/events.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index f847c161af..21487724ed 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -118,7 +118,7 @@ class EventsStore(SQLBaseStore): @defer.inlineCallbacks @log_function - def persist_event(self, event, context, current_state=None): + def persist_event(self, event, context, current_state=None, backfilled=False): try: with self._stream_id_gen.get_next() as stream_ordering: @@ -131,6 +131,7 @@ class EventsStore(SQLBaseStore): event=event, context=context, current_state=current_state, + backfilled=backfilled, ) except _RollbackButIsFineException: pass @@ -195,7 +196,7 @@ class EventsStore(SQLBaseStore): defer.returnValue({e.event_id: e for e in events}) @log_function - def _persist_event_txn(self, txn, event, context, current_state): + def _persist_event_txn(self, txn, event, context, current_state, backfilled=False): # We purposefully do this first since if we include a `current_state` # key, we *want* to update the `current_state_events` table if current_state: @@ -238,7 +239,7 @@ class EventsStore(SQLBaseStore): return self._persist_events_txn( txn, [(event, context)], - backfilled=False, + backfilled=backfilled, ) @log_function |