mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-01-12 04:09:29 -05:00
bail out early in on_new_receipts if no pushers (#4706)
This commit is contained in:
parent
6d65659b62
commit
0abb094f1a
1
changelog.d/4706.misc
Normal file
1
changelog.d/4706.misc
Normal file
@ -0,0 +1 @@
|
||||
Avoid some redundant work when processing read receipts
|
@ -140,6 +140,10 @@ class PusherPool:
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_new_notifications(self, min_stream_id, max_stream_id):
|
||||
if not self.pushers:
|
||||
# nothing to do here.
|
||||
return
|
||||
|
||||
try:
|
||||
users_affected = yield self.store.get_push_action_users_in_range(
|
||||
min_stream_id, max_stream_id
|
||||
@ -155,6 +159,10 @@ class PusherPool:
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_new_receipts(self, min_stream_id, max_stream_id, affected_room_ids):
|
||||
if not self.pushers:
|
||||
# nothing to do here.
|
||||
return
|
||||
|
||||
try:
|
||||
# Need to subtract 1 from the minimum because the lower bound here
|
||||
# is not inclusive
|
||||
|
Loading…
Reference in New Issue
Block a user