diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2021-11-26 18:41:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 18:41:31 +0000 |
commit | ffd858aa68239aeaf06591d94c0ab1b3c185440f (patch) | |
tree | d8802699acbc78790551e6c232f12650b65cab75 /synapse/replication/tcp | |
parent | Support expiry of refresh tokens and expiry of the overall session when refre... (diff) | |
download | synapse-ffd858aa68239aeaf06591d94c0ab1b3c185440f.tar.xz |
Add type hints to `synapse/storage/databases/main/events_worker.py` (#11411)
Also refactor the stream ID trackers/generators a bit and try to document them better.
Diffstat (limited to 'synapse/replication/tcp')
-rw-r--r-- | synapse/replication/tcp/streams/events.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/replication/tcp/streams/events.py b/synapse/replication/tcp/streams/events.py index a030e9299e..a390cfcb74 100644 --- a/synapse/replication/tcp/streams/events.py +++ b/synapse/replication/tcp/streams/events.py @@ -14,7 +14,7 @@ # limitations under the License. import heapq from collections.abc import Iterable -from typing import TYPE_CHECKING, List, Optional, Tuple, Type +from typing import TYPE_CHECKING, Optional, Tuple, Type import attr @@ -157,7 +157,7 @@ class EventsStream(Stream): # now we fetch up to that many rows from the events table - event_rows: List[Tuple] = await self._store.get_all_new_forward_event_rows( + event_rows = await self._store.get_all_new_forward_event_rows( instance_name, from_token, current_token, target_row_count ) @@ -191,7 +191,7 @@ class EventsStream(Stream): # finally, fetch the ex-outliers rows. We assume there are few enough of these # not to bother with the limit. - ex_outliers_rows: List[Tuple] = await self._store.get_ex_outlier_stream_rows( + ex_outliers_rows = await self._store.get_ex_outlier_stream_rows( instance_name, from_token, upper_limit ) |