Introduce a StickyEventStreamPosition NewType

This commit is contained in:
Olivier 'reivilibre
2026-07-20 12:21:54 +01:00
parent c97d48015a
commit 3f75c78673
+8
View File
@@ -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."""