mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-02 19:16:12 -04:00
Split PusherStore
This commit is contained in:
parent
a2b25de68d
commit
6f72765371
2 changed files with 8 additions and 13 deletions
|
@ -16,10 +16,10 @@
|
|||
from ._base import BaseSlavedStore
|
||||
from ._slaved_id_tracker import SlavedIdTracker
|
||||
|
||||
from synapse.storage import DataStore
|
||||
from synapse.storage.pusher import PusherWorkerStore
|
||||
|
||||
|
||||
class SlavedPusherStore(BaseSlavedStore):
|
||||
class SlavedPusherStore(PusherWorkerStore, BaseSlavedStore):
|
||||
|
||||
def __init__(self, db_conn, hs):
|
||||
super(SlavedPusherStore, self).__init__(db_conn, hs)
|
||||
|
@ -28,13 +28,6 @@ class SlavedPusherStore(BaseSlavedStore):
|
|||
extra_tables=[("deleted_pushers", "stream_id")],
|
||||
)
|
||||
|
||||
get_all_pushers = DataStore.get_all_pushers.__func__
|
||||
get_pushers_by = DataStore.get_pushers_by.__func__
|
||||
get_pushers_by_app_id_and_pushkey = (
|
||||
DataStore.get_pushers_by_app_id_and_pushkey.__func__
|
||||
)
|
||||
_decode_pushers_rows = DataStore._decode_pushers_rows.__func__
|
||||
|
||||
def stream_positions(self):
|
||||
result = super(SlavedPusherStore, self).stream_positions()
|
||||
result["pushers"] = self._pushers_id_gen.get_current_token()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue