mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-17 19:20:26 -04:00
Change DataStores to accept 'database' param.
This commit is contained in:
parent
f3ea2f5a08
commit
9a4fb457cf
41 changed files with 156 additions and 114 deletions
|
@ -22,6 +22,7 @@ from twisted.internet.defer import DeferredLock
|
|||
|
||||
from synapse.api.constants import EventTypes, Membership
|
||||
from synapse.storage.data_stores.main.state_deltas import StateDeltasStore
|
||||
from synapse.storage.database import Database
|
||||
from synapse.storage.engines import PostgresEngine
|
||||
from synapse.util.caches.descriptors import cached
|
||||
|
||||
|
@ -58,8 +59,8 @@ TYPE_TO_ORIGIN_TABLE = {"room": ("rooms", "room_id"), "user": ("users", "name")}
|
|||
|
||||
|
||||
class StatsStore(StateDeltasStore):
|
||||
def __init__(self, db_conn, hs):
|
||||
super(StatsStore, self).__init__(db_conn, hs)
|
||||
def __init__(self, database: Database, db_conn, hs):
|
||||
super(StatsStore, self).__init__(database, db_conn, hs)
|
||||
|
||||
self.server_name = hs.hostname
|
||||
self.clock = self.hs.get_clock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue