Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Always return a deferred from get_current_state_deltas. (#7019)
Browse files Browse the repository at this point in the history
* commit 'b29474e0a':
  Always return a deferred from `get_current_state_deltas`. (#7019)
  • Loading branch information
anoadragon453 committed Mar 24, 2020
2 parents 868ad41 + b29474e commit 13cb403
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/7019.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Port `synapse.handlers.presence` to async/await.
4 changes: 3 additions & 1 deletion synapse/storage/data_stores/main/state_deltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

import logging

from twisted.internet import defer

from synapse.storage._base import SQLBaseStore

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -56,7 +58,7 @@ def get_current_state_deltas(self, prev_stream_id: int, max_stream_id: int):
# if the CSDs haven't changed between prev_stream_id and now, we
# know for certain that they haven't changed between prev_stream_id and
# max_stream_id.
return max_stream_id, []
return defer.succeed((max_stream_id, []))

def get_current_state_deltas_txn(txn):
# First we calculate the max stream id that will give us less than
Expand Down

0 comments on commit 13cb403

Please sign in to comment.