mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-14 11:30:49 +00:00
Introduce a StickyEventStreamPosition NewType
This commit is contained in:
@@ -26,6 +26,7 @@ from typing import (
|
||||
Any,
|
||||
Awaitable,
|
||||
Callable,
|
||||
NewType,
|
||||
TypeVar,
|
||||
)
|
||||
|
||||
@@ -765,6 +766,13 @@ class ThreadSubscriptionsStream(_StreamFromIdGen):
|
||||
return rows, rows[-1][0], len(updates) == limit
|
||||
|
||||
|
||||
StickyEventStreamPosition = NewType("StickyEventStreamPosition", int)
|
||||
"""
|
||||
Integer corresponding to the stream position (`stream_id`)
|
||||
of a sticky event in the `sticky_events` table.
|
||||
"""
|
||||
|
||||
|
||||
@attr.s(slots=True, auto_attribs=True)
|
||||
class StickyEventsStreamRow:
|
||||
"""Stream to inform workers about changes to sticky events."""
|
||||
|
||||
Reference in New Issue
Block a user