mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-30 09:16:15 -05:00
Cleanup client_ips
This commit is contained in:
parent
8f1b385acc
commit
b1c0a4ceb3
@ -35,15 +35,8 @@ LAST_SEEN_GRANULARITY = 120 * 1000
|
|||||||
|
|
||||||
class ClientIpBackgroundUpdateStore(background_updates.BackgroundUpdateStore):
|
class ClientIpBackgroundUpdateStore(background_updates.BackgroundUpdateStore):
|
||||||
def __init__(self, db_conn, hs):
|
def __init__(self, db_conn, hs):
|
||||||
|
|
||||||
self.client_ip_last_seen = Cache(
|
|
||||||
name="client_ip_last_seen", keylen=4, max_entries=50000 * CACHE_SIZE_FACTOR
|
|
||||||
)
|
|
||||||
|
|
||||||
super(ClientIpBackgroundUpdateStore, self).__init__(db_conn, hs)
|
super(ClientIpBackgroundUpdateStore, self).__init__(db_conn, hs)
|
||||||
|
|
||||||
self.user_ips_max_age = hs.config.user_ips_max_age
|
|
||||||
|
|
||||||
self.register_background_index_update(
|
self.register_background_index_update(
|
||||||
"user_ips_device_index",
|
"user_ips_device_index",
|
||||||
index_name="user_ips_device_id",
|
index_name="user_ips_device_id",
|
||||||
|
Loading…
Reference in New Issue
Block a user