diff options
author | Erik Johnston <erikj@jki.re> | 2018-03-01 15:55:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-01 15:55:01 +0000 |
commit | 4bc4236fafb62c6a0a5af9a88114f28b5622702d (patch) | |
tree | a44d79a8a9eff65a96d0ede6fff8337e1309ebc7 /synapse/replication/slave | |
parent | Merge pull request #2921 from matrix-org/rav/unyielding_make_deferred_yieldable (diff) | |
parent | Split up RoomStore (diff) | |
download | synapse-4bc4236fafb62c6a0a5af9a88114f28b5622702d.tar.xz |
Merge pull request #2922 from matrix-org/erikj/split_room_store
Split up RoomStore
Diffstat (limited to 'synapse/replication/slave')
-rw-r--r-- | synapse/replication/slave/storage/room.py | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/synapse/replication/slave/storage/room.py b/synapse/replication/slave/storage/room.py index f510384033..5ae1670157 100644 --- a/synapse/replication/slave/storage/room.py +++ b/synapse/replication/slave/storage/room.py @@ -14,32 +14,19 @@ # limitations under the License. from ._base import BaseSlavedStore -from synapse.storage import DataStore -from synapse.storage.room import RoomStore +from synapse.storage.room import RoomWorkerStore from ._slaved_id_tracker import SlavedIdTracker -class RoomStore(BaseSlavedStore): +class RoomStore(RoomWorkerStore, BaseSlavedStore): def __init__(self, db_conn, hs): super(RoomStore, self).__init__(db_conn, hs) self._public_room_id_gen = SlavedIdTracker( db_conn, "public_room_list_stream", "stream_id" ) - get_public_room_ids = DataStore.get_public_room_ids.__func__ - get_current_public_room_stream_id = ( - DataStore.get_current_public_room_stream_id.__func__ - ) - get_public_room_ids_at_stream_id = ( - RoomStore.__dict__["get_public_room_ids_at_stream_id"] - ) - get_public_room_ids_at_stream_id_txn = ( - DataStore.get_public_room_ids_at_stream_id_txn.__func__ - ) - get_published_at_stream_id_txn = ( - DataStore.get_published_at_stream_id_txn.__func__ - ) - get_public_room_changes = DataStore.get_public_room_changes.__func__ + def get_current_public_room_stream_id(self): + return self._public_room_id_gen.get_current_token() def stream_positions(self): result = super(RoomStore, self).stream_positions() |