mirror of
https://mau.dev/maunium/synapse.git
synced 2025-03-05 09:20:14 +01:00
Reduce redundant database work in email pusher
Update the last stream ordering if the `get_unread_push_actions_for_user_in_range_for_email` returns no new push actions. This reduces the range that it needs to check next iteration.
This commit is contained in:
parent
513e600f63
commit
f0ca088280
1 changed files with 4 additions and 0 deletions
|
@ -150,6 +150,10 @@ class EmailPusher(object):
|
|||
|
||||
soonest_due_at = None
|
||||
|
||||
if not unprocessed:
|
||||
yield self.save_last_stream_ordering_and_success(self.max_stream_ordering)
|
||||
return
|
||||
|
||||
for push_action in unprocessed:
|
||||
received_at = push_action['received_ts']
|
||||
if received_at is None:
|
||||
|
|
Loading…
Add table
Reference in a new issue