Fix/improve some docstrings in the replication code. (#4949)

This commit is contained in:
Richard van der Hoff 2019-03-27 21:12:36 +00:00 committed by GitHub
parent bbd244c7b2
commit acaa18f7dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 7 deletions

View file

@ -103,10 +103,18 @@ class ReplicationClientHandler(object):
hs.get_reactor().connectTCP(host, port, self.factory)
def on_rdata(self, stream_name, token, rows):
"""Called when we get new replication data. By default this just pokes
the slave store.
"""Called to handle a batch of replication data with a given stream token.
Can be overriden in subclasses to handle more.
By default this just pokes the slave store. Can be overriden in subclasses to
handle more.
Args:
stream_name (str): name of the replication stream for this batch of rows
token (int): stream token for this batch of rows
rows (list): a list of Stream.ROW_TYPE objects.
Returns:
Deferred|None
"""
logger.debug("Received rdata %s -> %s", stream_name, token)
return self.store.process_replication_rows(stream_name, token, rows)