diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-01-25 11:09:53 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-01-25 11:09:53 +0000 |
commit | 821b65aeb51e744055e0eaaf9b528587fa494b20 (patch) | |
tree | c4231f142f51d319c4b86c2dcc0e4fa691a3bed0 /synapse/handlers/user_directory.py | |
parent | Move tag and direct state copying into separate function (diff) | |
parent | Merge pull request #4415 from matrix-org/anoa/full_search_upgraded_rooms (diff) | |
download | synapse-821b65aeb51e744055e0eaaf9b528587fa494b20.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/dm_room_upgrade
Diffstat (limited to 'synapse/handlers/user_directory.py')
-rw-r--r-- | synapse/handlers/user_directory.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py index 3c40999338..120815b09b 100644 --- a/synapse/handlers/user_directory.py +++ b/synapse/handlers/user_directory.py @@ -19,6 +19,7 @@ from six import iteritems from twisted.internet import defer +import synapse.metrics from synapse.api.constants import EventTypes, JoinRules, Membership from synapse.metrics.background_process_metrics import run_as_background_process from synapse.storage.roommember import ProfileInfo @@ -163,6 +164,11 @@ class UserDirectoryHandler(object): yield self._handle_deltas(deltas) self.pos = deltas[-1]["stream_id"] + + # Expose current event processing position to prometheus + synapse.metrics.event_processing_positions.labels( + "user_dir").set(self.pos) + yield self.store.update_user_directory_stream_pos(self.pos) @defer.inlineCallbacks |