mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-07 18:03:10 +00:00
Set datastore's .hs field in SQLBaseStore rather than in the toplevel DataStore mixed-in result class
This commit is contained in:
parent
59dfbaba3b
commit
baf04be5cf
@ -44,7 +44,6 @@ class DataStore(RoomDataStore, RoomMemberStore, MessageStore, RoomStore,
|
|||||||
def __init__(self, hs):
|
def __init__(self, hs):
|
||||||
super(DataStore, self).__init__(hs)
|
super(DataStore, self).__init__(hs)
|
||||||
self.event_factory = hs.get_event_factory()
|
self.event_factory = hs.get_event_factory()
|
||||||
self.hs = hs
|
|
||||||
|
|
||||||
def persist_event(self, event):
|
def persist_event(self, event):
|
||||||
if event.type == MessageEvent.TYPE:
|
if event.type == MessageEvent.TYPE:
|
||||||
|
@ -27,6 +27,7 @@ logger = logging.getLogger(__name__)
|
|||||||
class SQLBaseStore(object):
|
class SQLBaseStore(object):
|
||||||
|
|
||||||
def __init__(self, hs):
|
def __init__(self, hs):
|
||||||
|
self.hs = hs
|
||||||
self._db_pool = hs.get_db_pool()
|
self._db_pool = hs.get_db_pool()
|
||||||
|
|
||||||
def cursor_to_dict(self, cursor):
|
def cursor_to_dict(self, cursor):
|
||||||
|
Loading…
Reference in New Issue
Block a user