Load the current id in the IdGenerator constructor
Rather than loading them lazily. This allows us to remove all the yield statements and spurious arguments for the get_next methods. It also allows us to replace all instances of get_next_txn with get_next since get_next no longer needs to access the db.
Showing
- synapse/storage/__init__.py 7 additions, 7 deletionssynapse/storage/__init__.py
- synapse/storage/account_data.py 4 additions, 4 deletionssynapse/storage/account_data.py
- synapse/storage/events.py 3 additions, 3 deletionssynapse/storage/events.py
- synapse/storage/presence.py 2 additions, 2 deletionssynapse/storage/presence.py
- synapse/storage/push_rule.py 2 additions, 2 deletionssynapse/storage/push_rule.py
- synapse/storage/pusher.py 1 addition, 1 deletionsynapse/storage/pusher.py
- synapse/storage/receipts.py 2 additions, 2 deletionssynapse/storage/receipts.py
- synapse/storage/registration.py 3 additions, 3 deletionssynapse/storage/registration.py
- synapse/storage/state.py 1 addition, 1 deletionsynapse/storage/state.py
- synapse/storage/tags.py 4 additions, 4 deletionssynapse/storage/tags.py
- synapse/storage/transactions.py 1 addition, 1 deletionsynapse/storage/transactions.py
- synapse/storage/util/id_generators.py 22 additions, 47 deletionssynapse/storage/util/id_generators.py
Loading
Please register or sign in to comment