mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 01:44:02 +01:00
Assert that the step != 0
This commit is contained in:
parent
35b5c4ba1b
commit
9bc5b4c663
1 changed files with 1 additions and 0 deletions
|
@ -67,6 +67,7 @@ class StreamIdGenerator(object):
|
||||||
# ... persist event ...
|
# ... persist event ...
|
||||||
"""
|
"""
|
||||||
def __init__(self, db_conn, table, column, extra_tables=[], step=1):
|
def __init__(self, db_conn, table, column, extra_tables=[], step=1):
|
||||||
|
assert step != 0
|
||||||
self._lock = threading.Lock()
|
self._lock = threading.Lock()
|
||||||
self._step = step
|
self._step = step
|
||||||
self._current = _load_current_id(db_conn, table, column, step)
|
self._current = _load_current_id(db_conn, table, column, step)
|
||||||
|
|
Loading…
Reference in a new issue