mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
Poke the slaved pushers on new receipts
This commit is contained in:
parent
f41b1a8723
commit
1c1b2de975
2 changed files with 11 additions and 0 deletions
|
@ -136,6 +136,16 @@ class PusherServer(HomeServer):
|
|||
min_stream_id, max_stream_id
|
||||
)
|
||||
|
||||
stream = results.get("receipts")
|
||||
if stream:
|
||||
rows = stream["rows"]
|
||||
affected_room_ids = set(row[1] for row in rows)
|
||||
min_stream_id = rows[0][0]
|
||||
max_stream_id = stream["position"]
|
||||
preserve_fn(pusher_pool.on_new_receipts)(
|
||||
min_stream_id, max_stream_id, affected_room_ids
|
||||
)
|
||||
|
||||
while True:
|
||||
try:
|
||||
args = store.stream_positions()
|
||||
|
|
|
@ -40,6 +40,7 @@ class SlavedReceiptsStore(BaseSlavedStore):
|
|||
get_receipts_for_user = ReceiptsStore.__dict__["get_receipts_for_user"]
|
||||
|
||||
get_max_receipt_stream_id = DataStore.get_max_receipt_stream_id.__func__
|
||||
get_all_updated_receipts = DataStore.get_all_updated_receipts.__func__
|
||||
|
||||
def stream_positions(self):
|
||||
result = super(SlavedReceiptsStore, self).stream_positions()
|
||||
|
|
Loading…
Reference in a new issue