diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-01-05 10:53:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 10:53:15 -0500 |
commit | 37eaf9c27271197320d4bedcceaf58d746935e53 (patch) | |
tree | 4758ca9622e660351b56f7c6e47bacbd39550faf /synapse/push/pusherpool.py | |
parent | Add type hints to the receipts and user directory handlers. (#8976) (diff) | |
download | synapse-37eaf9c27271197320d4bedcceaf58d746935e53.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | synapse/push/pusherpool.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/push/pusherpool.py b/synapse/push/pusherpool.py index 8158356d40..eed16dbfb5 100644 --- a/synapse/push/pusherpool.py +++ b/synapse/push/pusherpool.py @@ -106,6 +106,10 @@ class PusherPool: time_now_msec = self.clock.time_msec() + # create the pusher setting last_stream_ordering to the current maximum + # stream ordering, so it will process pushes from this point onwards. + last_stream_ordering = self.store.get_room_max_stream_ordering() + # we try to create the pusher just to validate the config: it # will then get pulled out of the database, # recreated, added and started: this means we have only one @@ -124,16 +128,12 @@ class PusherPool: ts=time_now_msec, lang=lang, data=data, - last_stream_ordering=None, + last_stream_ordering=last_stream_ordering, last_success=None, failing_since=None, ) ) - # create the pusher setting last_stream_ordering to the current maximum - # stream ordering, so it will process pushes from this point onwards. - last_stream_ordering = self.store.get_room_max_stream_ordering() - await self.store.add_pusher( user_id=user_id, access_token=access_token, |