summary refs log tree commit diff
path: root/synapse/replication/slave/storage/deviceinbox.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-03-04 18:03:29 +0000
committerErik Johnston <erik@matrix.org>2019-03-04 18:04:57 +0000
commita84b8d56c2cfec62c87a13771c817b3205b5ec4b (patch)
tree84274f4585b12be535e6182d12e108cfb5c1c318 /synapse/replication/slave/storage/deviceinbox.py
parentFix v4v6 option in HAProxy example config (#4790) (diff)
downloadsynapse-a84b8d56c2cfec62c87a13771c817b3205b5ec4b.tar.xz
Fixup slave stores
Diffstat (limited to 'synapse/replication/slave/storage/deviceinbox.py')
-rw-r--r--synapse/replication/slave/storage/deviceinbox.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/synapse/replication/slave/storage/deviceinbox.py b/synapse/replication/slave/storage/deviceinbox.py
index 4f19fd35aa..4d59778863 100644
--- a/synapse/replication/slave/storage/deviceinbox.py
+++ b/synapse/replication/slave/storage/deviceinbox.py
@@ -13,15 +13,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from synapse.storage import DataStore
+from synapse.replication.slave.storage._base import BaseSlavedStore
+from synapse.replication.slave.storage._slaved_id_tracker import SlavedIdTracker
+from synapse.storage.deviceinbox import DeviceInboxWorkerStore
 from synapse.util.caches.expiringcache import ExpiringCache
 from synapse.util.caches.stream_change_cache import StreamChangeCache
 
-from ._base import BaseSlavedStore, __func__
-from ._slaved_id_tracker import SlavedIdTracker
 
-
-class SlavedDeviceInboxStore(BaseSlavedStore):
+class SlavedDeviceInboxStore(DeviceInboxWorkerStore, BaseSlavedStore):
     def __init__(self, db_conn, hs):
         super(SlavedDeviceInboxStore, self).__init__(db_conn, hs)
         self._device_inbox_id_gen = SlavedIdTracker(
@@ -43,12 +42,6 @@ class SlavedDeviceInboxStore(BaseSlavedStore):
             expiry_ms=30 * 60 * 1000,
         )
 
-    get_to_device_stream_token = __func__(DataStore.get_to_device_stream_token)
-    get_new_messages_for_device = __func__(DataStore.get_new_messages_for_device)
-    get_new_device_msgs_for_remote = __func__(DataStore.get_new_device_msgs_for_remote)
-    delete_messages_for_device = __func__(DataStore.delete_messages_for_device)
-    delete_device_msgs_for_remote = __func__(DataStore.delete_device_msgs_for_remote)
-
     def stream_positions(self):
         result = super(SlavedDeviceInboxStore, self).stream_positions()
         result["to_device"] = self._device_inbox_id_gen.get_current_token()