mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-20 20:44:53 -04:00
Split PusherStore
This commit is contained in:
parent
a2b25de68d
commit
6f72765371
2 changed files with 8 additions and 13 deletions
|
@ -27,7 +27,7 @@ import types
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PusherStore(SQLBaseStore):
|
||||
class PusherWorkerStore(SQLBaseStore):
|
||||
def _decode_pushers_rows(self, rows):
|
||||
for r in rows:
|
||||
dataJson = r['data']
|
||||
|
@ -102,9 +102,6 @@ class PusherStore(SQLBaseStore):
|
|||
rows = yield self.runInteraction("get_all_pushers", get_pushers)
|
||||
defer.returnValue(rows)
|
||||
|
||||
def get_pushers_stream_token(self):
|
||||
return self._pushers_id_gen.get_current_token()
|
||||
|
||||
def get_all_updated_pushers(self, last_id, current_id, limit):
|
||||
if last_id == current_id:
|
||||
return defer.succeed(([], []))
|
||||
|
@ -177,6 +174,11 @@ class PusherStore(SQLBaseStore):
|
|||
"get_all_updated_pushers_rows", get_all_updated_pushers_rows_txn
|
||||
)
|
||||
|
||||
|
||||
class PusherStore(PusherWorkerStore):
|
||||
def get_pushers_stream_token(self):
|
||||
return self._pushers_id_gen.get_current_token()
|
||||
|
||||
@cachedInlineCallbacks(num_args=1, max_entries=15000)
|
||||
def get_if_user_has_pusher(self, user_id):
|
||||
# This only exists for the cachedList decorator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue