Add a timestamp to USER_SYNC command

This timestamp is used to indicate when the user last sync'd
This commit is contained in:
Erik Johnston 2017-03-31 11:46:20 +01:00
parent 9d0170ac6c
commit 36d2b66f90
4 changed files with 24 additions and 16 deletions

View file

@ -220,12 +220,12 @@ class ReplicationStreamer(object):
self.federation_sender.federation_ack(token)
@measure_func("repl.on_user_sync")
def on_user_sync(self, conn_id, user_id, is_syncing):
def on_user_sync(self, conn_id, user_id, is_syncing, last_sync_ms):
"""A client has started/stopped syncing on a worker.
"""
user_sync_counter.inc()
self.presence_handler.update_external_syncs_row(
conn_id, user_id, is_syncing
conn_id, user_id, is_syncing, last_sync_ms,
)
@measure_func("repl.on_remove_pusher")