mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 15:33:50 +01:00
Comments on get_all_new_events_stream
just some docstrings to clarify the behaviour here
This commit is contained in:
parent
e97d93948d
commit
8ddd0f273c
1 changed files with 15 additions and 1 deletions
|
@ -630,7 +630,21 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def get_all_new_events_stream(self, from_id, current_id, limit):
|
def get_all_new_events_stream(self, from_id, current_id, limit):
|
||||||
"""Get all new events"""
|
"""Get all new events
|
||||||
|
|
||||||
|
Returns all events with from_id < stream_ordering <= current_id.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
from_id (int): the stream_ordering of the last event we processed
|
||||||
|
current_id (int): the stream_ordering of the most recently processed event
|
||||||
|
limit (int): the maximum number of events to return
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Deferred[Tuple[int, list[FrozenEvent]]]: A tuple of (next_id, events), where
|
||||||
|
`next_id` is the next value to pass as `from_id` (it will either be the
|
||||||
|
stream_ordering of the last returned event, or, if fewer than `limit` events
|
||||||
|
were found, `current_id`.
|
||||||
|
"""
|
||||||
|
|
||||||
def get_all_new_events_stream_txn(txn):
|
def get_all_new_events_stream_txn(txn):
|
||||||
sql = (
|
sql = (
|
||||||
|
|
Loading…
Reference in a new issue