mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-23 06:20:35 -04:00
Convert internal pusher dicts to attrs classes. (#8940)
This improves type hinting and should use less memory.
This commit is contained in:
parent
7a332850e6
commit
bd30cfe86a
17 changed files with 266 additions and 204 deletions
|
@ -153,12 +153,12 @@ class StreamIdGenerator:
|
|||
|
||||
return _AsyncCtxManagerWrapper(manager())
|
||||
|
||||
def get_current_token(self):
|
||||
def get_current_token(self) -> int:
|
||||
"""Returns the maximum stream id such that all stream ids less than or
|
||||
equal to it have been successfully persisted.
|
||||
|
||||
Returns:
|
||||
int
|
||||
The maximum stream id.
|
||||
"""
|
||||
with self._lock:
|
||||
if self._unfinished_ids:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue