summary refs log tree commit diff
path: root/synapse/replication/slave/storage/deviceinbox.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-07-01 16:35:40 +0100
committerGitHub <noreply@github.com>2020-07-01 16:35:40 +0100
commitf01e2ca039f09e921f9028c9efa0ad0e09b53d04 (patch)
treed51077e038d0a4744cc57ae6c812ed1c13d69361 /synapse/replication/slave/storage/deviceinbox.py
parentType checking for `FederationHandler` (#7770) (diff)
downloadsynapse-f01e2ca039f09e921f9028c9efa0ad0e09b53d04.tar.xz
Use symbolic names for replication stream names (#7768)
This makes it much easier to find where streams are referenced.
Diffstat (limited to 'synapse/replication/slave/storage/deviceinbox.py')
-rw-r--r--synapse/replication/slave/storage/deviceinbox.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/replication/slave/storage/deviceinbox.py b/synapse/replication/slave/storage/deviceinbox.py
index 6e7fd259d4..bd394f6b00 100644
--- a/synapse/replication/slave/storage/deviceinbox.py
+++ b/synapse/replication/slave/storage/deviceinbox.py
@@ -15,6 +15,7 @@
 
 from synapse.replication.slave.storage._base import BaseSlavedStore
 from synapse.replication.slave.storage._slaved_id_tracker import SlavedIdTracker
+from synapse.replication.tcp.streams import ToDeviceStream
 from synapse.storage.data_stores.main.deviceinbox import DeviceInboxWorkerStore
 from synapse.storage.database import Database
 from synapse.util.caches.expiringcache import ExpiringCache
@@ -44,7 +45,7 @@ class SlavedDeviceInboxStore(DeviceInboxWorkerStore, BaseSlavedStore):
         )
 
     def process_replication_rows(self, stream_name, instance_name, token, rows):
-        if stream_name == "to_device":
+        if stream_name == ToDeviceStream.NAME:
             self._device_inbox_id_gen.advance(token)
             for row in rows:
                 if row.entity.startswith("@"):