mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:36:02 -04:00
Fix-up assertions about last stream token in push (#9020)
The last stream token is always known and we do not need to handle none.
This commit is contained in:
parent
31b1905e13
commit
37eaf9c272
5 changed files with 8 additions and 14 deletions
|
@ -157,7 +157,6 @@ class EmailPusher(Pusher):
|
|||
being run.
|
||||
"""
|
||||
start = 0 if INCLUDE_ALL_UNREAD_NOTIFS else self.last_stream_ordering
|
||||
assert start is not None
|
||||
unprocessed = await self.store.get_unread_push_actions_for_user_in_range_for_email(
|
||||
self.user_id, start, self.max_stream_ordering
|
||||
)
|
||||
|
@ -220,12 +219,8 @@ class EmailPusher(Pusher):
|
|||
)
|
||||
|
||||
async def save_last_stream_ordering_and_success(
|
||||
self, last_stream_ordering: Optional[int]
|
||||
self, last_stream_ordering: int
|
||||
) -> None:
|
||||
if last_stream_ordering is None:
|
||||
# This happens if we haven't yet processed anything
|
||||
return
|
||||
|
||||
self.last_stream_ordering = last_stream_ordering
|
||||
pusher_still_exists = await self.store.update_pusher_last_stream_ordering_and_success(
|
||||
self.app_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue