summary refs log tree commit diff
path: root/synapse/storage/databases
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r--synapse/storage/databases/main/cache.py6
-rw-r--r--synapse/storage/databases/main/stats.py5
2 files changed, 5 insertions, 6 deletions
diff --git a/synapse/storage/databases/main/cache.py b/synapse/storage/databases/main/cache.py

index 92630f3ecc..7189d945c3 100644 --- a/synapse/storage/databases/main/cache.py +++ b/synapse/storage/databases/main/cache.py
@@ -35,7 +35,7 @@ from synapse.storage.databases.main.event_push_actions import ( ) from synapse.storage.databases.main.relations import RelationsWorkerStore from synapse.storage.databases.main.roommember import RoomMemberWorkerStore -from synapse.storage.databases.main.stats import StatsStore +from synapse.storage.databases.main.state_deltas import StateDeltasStore from synapse.storage.databases.main.stream import StreamWorkerStore from synapse.storage.engines import PostgresEngine from synapse.storage.util.id_generators import MultiWriterIdGenerator @@ -61,7 +61,7 @@ class CacheInvalidationWorkerStore( RelationsWorkerStore, EventPushActionsWorkerStore, StreamWorkerStore, - StatsStore, + StateDeltasStore, RoomMemberWorkerStore, ): # This class must be mixed in with a child class which provides the following @@ -347,7 +347,7 @@ class CacheInvalidationWorkerStore( "instance_name": self._instance_name, "cache_func": cache_name, "keys": keys, - "invalidation_ts": self.clock.time_msec(), + "invalidation_ts": self._clock.time_msec(), }, ) diff --git a/synapse/storage/databases/main/stats.py b/synapse/storage/databases/main/stats.py
index 5d7b59d861..f735a42176 100644 --- a/synapse/storage/databases/main/stats.py +++ b/synapse/storage/databases/main/stats.py
@@ -100,7 +100,6 @@ class StatsStore(StateDeltasStore): super().__init__(database, db_conn, hs) self.server_name = hs.hostname - self.clock = self.hs.get_clock() self.stats_enabled = hs.config.stats.stats_enabled self.stats_delta_processing_lock = DeferredLock() @@ -601,7 +600,7 @@ class StatsStore(StateDeltasStore): local_users_in_room = [u for u in users_in_room if self.hs.is_mine_id(u)] await self.update_stats_delta( - ts=self.clock.time_msec(), + ts=self._clock.time_msec(), stats_type="room", stats_id=room_id, fields={}, @@ -638,7 +637,7 @@ class StatsStore(StateDeltasStore): ) await self.update_stats_delta( - ts=self.clock.time_msec(), + ts=self._clock.time_msec(), stats_type="user", stats_id=user_id, fields={},