diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-04-01 15:07:01 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-04-01 15:07:01 +0100 |
commit | 35b5c4ba1b1892fde18f531c96d71aa58de649e1 (patch) | |
tree | 256846ca88941e4bf3fc6050b95a9a1bd0f25750 /synapse/storage | |
parent | Rename direction to step, apply checks consistently (diff) | |
download | synapse-35b5c4ba1b1892fde18f531c96d71aa58de649e1.tar.xz |
use google style doc strings
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/util/id_generators.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/synapse/storage/util/id_generators.py b/synapse/storage/util/id_generators.py index 310b7dc6ee..58ea54cf67 100644 --- a/synapse/storage/util/id_generators.py +++ b/synapse/storage/util/id_generators.py @@ -49,17 +49,18 @@ class StreamIdGenerator(object): all ids less than or equal to it have completed. This handles the fact that persistence of events can complete out of order. - :param connection db_conn: A database connection to use to fetch the - initial value of the generator from. - :param str table: A database table to read the initial value of the id - generator from. - :param str column: The column of the database table to read the initial - value from the id generator from. - :param list extra_tables: List of pairs of database tables and columns to - use to source the initial value of the generator from. The value with - the largest magnitude is used. - :param int step: which direction the stream ids grow in. +1 to grow - upwards, -1 to grow downwards. + Args: + db_conn(connection): A database connection to use to fetch the + initial value of the generator from. + table(str): A database table to read the initial value of the id + generator from. + column(str): The column of the database table to read the initial + value from the id generator from. + extra_tables(list): List of pairs of database tables and columns to + use to source the initial value of the generator from. The value + with the largest magnitude is used. + step(int): which direction the stream ids grow in. +1 to grow + upwards, -1 to grow downwards. Usage: with stream_id_gen.get_next() as stream_id: |