mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-30 14:12:28 +00:00
Shift some of the state_group methods into the SlavedEventStore
This commit is contained in:
parent
b5e646a18c
commit
206eb9fd94
@ -23,7 +23,6 @@ from synapse.config.logger import LoggingConfig
|
|||||||
from synapse.config.emailconfig import EmailConfig
|
from synapse.config.emailconfig import EmailConfig
|
||||||
from synapse.http.site import SynapseSite
|
from synapse.http.site import SynapseSite
|
||||||
from synapse.metrics.resource import MetricsResource, METRICS_PREFIX
|
from synapse.metrics.resource import MetricsResource, METRICS_PREFIX
|
||||||
from synapse.storage.state import StateStore
|
|
||||||
from synapse.storage.roommember import RoomMemberStore
|
from synapse.storage.roommember import RoomMemberStore
|
||||||
from synapse.storage.account_data import AccountDataStore
|
from synapse.storage.account_data import AccountDataStore
|
||||||
from synapse.replication.slave.storage.events import SlavedEventStore
|
from synapse.replication.slave.storage.events import SlavedEventStore
|
||||||
@ -131,50 +130,6 @@ class PusherSlaveStore(
|
|||||||
DataStore.get_profile_displayname.__func__
|
DataStore.get_profile_displayname.__func__
|
||||||
)
|
)
|
||||||
|
|
||||||
get_state_groups = (
|
|
||||||
DataStore.get_state_groups.__func__
|
|
||||||
)
|
|
||||||
|
|
||||||
_get_state_for_groups = (
|
|
||||||
DataStore._get_state_for_groups.__func__
|
|
||||||
)
|
|
||||||
|
|
||||||
_get_all_state_from_cache = (
|
|
||||||
DataStore._get_all_state_from_cache.__func__
|
|
||||||
)
|
|
||||||
|
|
||||||
get_events_around = (
|
|
||||||
DataStore.get_events_around.__func__
|
|
||||||
)
|
|
||||||
|
|
||||||
_get_events_around_txn = (
|
|
||||||
DataStore._get_events_around_txn.__func__
|
|
||||||
)
|
|
||||||
|
|
||||||
get_state_for_events = (
|
|
||||||
DataStore.get_state_for_events.__func__
|
|
||||||
)
|
|
||||||
|
|
||||||
_get_some_state_from_cache = (
|
|
||||||
DataStore._get_some_state_from_cache.__func__
|
|
||||||
)
|
|
||||||
|
|
||||||
_get_state_group_for_events = (
|
|
||||||
StateStore.__dict__["_get_state_group_for_events"]
|
|
||||||
)
|
|
||||||
|
|
||||||
_get_state_group_for_event = (
|
|
||||||
StateStore.__dict__["_get_state_group_for_event"]
|
|
||||||
)
|
|
||||||
|
|
||||||
_get_state_groups_from_groups = (
|
|
||||||
StateStore.__dict__["_get_state_groups_from_groups"]
|
|
||||||
)
|
|
||||||
|
|
||||||
_get_state_group_from_group = (
|
|
||||||
StateStore.__dict__["_get_state_group_from_group"]
|
|
||||||
)
|
|
||||||
|
|
||||||
get_global_account_data_by_type_for_users = (
|
get_global_account_data_by_type_for_users = (
|
||||||
AccountDataStore.__dict__["get_global_account_data_by_type_for_users"]
|
AccountDataStore.__dict__["get_global_account_data_by_type_for_users"]
|
||||||
)
|
)
|
||||||
|
@ -75,6 +75,18 @@ class SlavedEventStore(BaseSlavedStore):
|
|||||||
get_unread_event_push_actions_by_room_for_user = (
|
get_unread_event_push_actions_by_room_for_user = (
|
||||||
EventPushActionsStore.__dict__["get_unread_event_push_actions_by_room_for_user"]
|
EventPushActionsStore.__dict__["get_unread_event_push_actions_by_room_for_user"]
|
||||||
)
|
)
|
||||||
|
_get_state_group_for_events = (
|
||||||
|
StateStore.__dict__["_get_state_group_for_events"]
|
||||||
|
)
|
||||||
|
_get_state_group_for_event = (
|
||||||
|
StateStore.__dict__["_get_state_group_for_event"]
|
||||||
|
)
|
||||||
|
_get_state_groups_from_groups = (
|
||||||
|
StateStore.__dict__["_get_state_groups_from_groups"]
|
||||||
|
)
|
||||||
|
_get_state_group_from_group = (
|
||||||
|
StateStore.__dict__["_get_state_group_from_group"]
|
||||||
|
)
|
||||||
|
|
||||||
get_unread_push_actions_for_user_in_range = (
|
get_unread_push_actions_for_user_in_range = (
|
||||||
DataStore.get_unread_push_actions_for_user_in_range.__func__
|
DataStore.get_unread_push_actions_for_user_in_range.__func__
|
||||||
@ -96,6 +108,9 @@ class SlavedEventStore(BaseSlavedStore):
|
|||||||
get_room_events_stream_for_room = (
|
get_room_events_stream_for_room = (
|
||||||
DataStore.get_room_events_stream_for_room.__func__
|
DataStore.get_room_events_stream_for_room.__func__
|
||||||
)
|
)
|
||||||
|
get_events_around = DataStore.get_events_around.__func__
|
||||||
|
get_state_for_events = DataStore.get_state_for_events.__func__
|
||||||
|
get_state_groups = DataStore.get_state_groups.__func__
|
||||||
|
|
||||||
_set_before_and_after = DataStore._set_before_and_after
|
_set_before_and_after = DataStore._set_before_and_after
|
||||||
|
|
||||||
@ -116,6 +131,10 @@ class SlavedEventStore(BaseSlavedStore):
|
|||||||
DataStore._get_rooms_for_user_where_membership_is_txn.__func__
|
DataStore._get_rooms_for_user_where_membership_is_txn.__func__
|
||||||
)
|
)
|
||||||
_get_members_rows_txn = DataStore._get_members_rows_txn.__func__
|
_get_members_rows_txn = DataStore._get_members_rows_txn.__func__
|
||||||
|
_get_state_for_groups = DataStore._get_state_for_groups.__func__
|
||||||
|
_get_all_state_from_cache = DataStore._get_all_state_from_cache.__func__
|
||||||
|
_get_events_around_txn = DataStore._get_events_around_txn.__func__
|
||||||
|
_get_some_state_from_cache = DataStore._get_some_state_from_cache.__func__
|
||||||
|
|
||||||
def stream_positions(self):
|
def stream_positions(self):
|
||||||
result = super(SlavedEventStore, self).stream_positions()
|
result = super(SlavedEventStore, self).stream_positions()
|
||||||
|
Loading…
Reference in New Issue
Block a user