Track where event stream processing have gotten up to

This commit is contained in:
Erik Johnston 2018-04-11 11:07:51 +01:00
parent ab825aa328
commit 92e34615c5
4 changed files with 24 additions and 0 deletions

View file

@ -444,6 +444,9 @@ class EventsStore(EventsWorkerStore):
new_forward_extremeties=new_forward_extremeties,
)
persist_event_counter.inc_by(len(chunk))
synapse.metrics.event_persisted_position.set(
chunk[-1][0].internal_metadata.stream_ordering,
)
for event, context in chunk:
if context.app_service:
origin_type = "local"