summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-07-28 20:55:50 +0100
committerGitHub <noreply@github.com>2021-07-28 19:55:50 +0000
commit858363d0b7e58fd71875b25d183537bb3b5a397f (patch)
tree080bc8232ee759309c29ee50c875e4bcddd39b2f /synapse/storage
parentMake historical events discoverable from backfill for servers without any scr... (diff)
downloadsynapse-858363d0b7e58fd71875b25d183537bb3b5a397f.tar.xz
Generics for `ObservableDeferred` (#10491)
Now that `Deferred` is a generic class, let's update `ObeservableDeferred` to
follow suit.
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/persist_events.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/persist_events.py b/synapse/storage/persist_events.py
index a39877f0d5..0e8270746d 100644
--- a/synapse/storage/persist_events.py
+++ b/synapse/storage/persist_events.py
@@ -170,7 +170,9 @@ class _EventPeristenceQueue(Generic[_PersistResult]):
             end_item = queue[-1]
         else:
             # need to make a new queue item
-            deferred = ObservableDeferred(defer.Deferred(), consumeErrors=True)
+            deferred: ObservableDeferred[_PersistResult] = ObservableDeferred(
+                defer.Deferred(), consumeErrors=True
+            )
 
             end_item = _EventPersistQueueItem(
                 events_and_contexts=[],