summary refs log tree commit diff
path: root/synapse/replication/slave/storage/client_ips.py
diff options
context:
space:
mode:
authorSean Quah <seanq@element.io>2021-10-26 14:32:17 +0100
committerSean Quah <seanq@element.io>2021-10-26 14:32:17 +0100
commitd8c1a2149262ded099e24d74856a33405ceca3a0 (patch)
tree38439de5e9baba953606e6518f1ba227b7ec4955 /synapse/replication/slave/storage/client_ips.py
parentMerge branch 'release-v1.45' of github.com:matrix-org/synapse into matrix-org... (diff)
parentMove #10975 to bugfix section in changelog (diff)
downloadsynapse-d8c1a2149262ded099e24d74856a33405ceca3a0.tar.xz
Merge branch 'release-v1.46' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/replication/slave/storage/client_ips.py')
-rw-r--r--synapse/replication/slave/storage/client_ips.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/replication/slave/storage/client_ips.py b/synapse/replication/slave/storage/client_ips.py

index 436d39c320..61cd7e5228 100644 --- a/synapse/replication/slave/storage/client_ips.py +++ b/synapse/replication/slave/storage/client_ips.py
@@ -12,15 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. +from typing import TYPE_CHECKING + from synapse.storage.database import DatabasePool from synapse.storage.databases.main.client_ips import LAST_SEEN_GRANULARITY from synapse.util.caches.lrucache import LruCache from ._base import BaseSlavedStore +if TYPE_CHECKING: + from synapse.server import HomeServer + class SlavedClientIpStore(BaseSlavedStore): - def __init__(self, database: DatabasePool, db_conn, hs): + def __init__(self, database: DatabasePool, db_conn, hs: "HomeServer"): super().__init__(database, db_conn, hs) self.client_ip_last_seen: LruCache[tuple, int] = LruCache(