mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 13:04:21 -04:00
Track last processed event received_ts
This commit is contained in:
parent
92e34615c5
commit
4dae4a97ed
4 changed files with 52 additions and 0 deletions
|
@ -51,6 +51,24 @@ _EventCacheEntry = namedtuple("_EventCacheEntry", ("event", "redacted_event"))
|
|||
|
||||
|
||||
class EventsWorkerStore(SQLBaseStore):
|
||||
def get_received_ts(self, event_id):
|
||||
"""Get received_ts (when it was persisted) for the event
|
||||
|
||||
Args:
|
||||
event_id (str)
|
||||
|
||||
Returns:
|
||||
Deferred[int|None]: Timstamp in milliseconds, or None for events
|
||||
that were persisted before received_ts was implemented.
|
||||
"""
|
||||
return self._simple_select_one_onecol(
|
||||
table="events",
|
||||
keyvalues={
|
||||
"event_id": event_id,
|
||||
},
|
||||
retcol="received_ts",
|
||||
desc="get_received_ts",
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_event(self, event_id, check_redacted=True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue